diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 000000000..ef1f8d1e3 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,30 @@ +name: "Lint" +on: + # Allow us to run this specific workflow without a PR + workflow_dispatch: + pull_request: + push: + branches: + - main + +# cancel redundant builds +concurrency: + # for push and workflow_dispatch events we use `github.sha` in the concurrency group and don't really cancel each other out/limit concurrency + # for pull_request events newer jobs cancel earlier jobs to save on CI etc. + group: ${{ github.workflow }}-${{ github.event_name }}-${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.sha || github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + Python: + runs-on: ubuntu-latest + defaults: + run: + working-directory: python + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - uses: snok/install-poetry@v1 + with: + version: 1.4.2 + - run: poetry install + - run: poetry run poe lint diff --git a/.gitignore b/.gitignore index d514db10c..6a779781c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ __pycache__.DS_Store __pycache__ config.yaml cursor.txt +node_modules +build +venv \ No newline at end of file diff --git a/.python-version b/.python-version new file mode 100644 index 000000000..2c0733315 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.11 diff --git a/README.md b/README.md index b10d89dde..f9cf64658 100644 --- a/README.md +++ b/README.md @@ -22,45 +22,6 @@ mainnet: 34.30.218.153:50051 - The response is a stream of `RawDatastreamResponse` objects. - For each supported language, there is an `aptos` folder which contains the auto-generate protobuf files in that language. You can check out the files to see the stream response format and figure out how to parse the response. -# Quickstart -## Python -### Prerequisite -- Python 3.7 or higher -- `pip` version 9.0.1 or higher -### Guide -1. Install the latest version of gRPC and tooling for Python: - ``` - python -m pip install grpcio - python -m pip install grpcio-tools - - ``` -2. Download the example: -``` -# Clone the repository to get the example code: -$ git clone https://github.com/aptos-labs/aptos-indexer-client-examples -# Navigate to the python folder -$ cd aptos-indexer-client-examples/python -``` -In this example, we are creating an event parser. -3. Create a client. - - First you need to create a gRPC client that reads the stream of data. - - We've create an example client in `grpc_client.py`. This client - - Connects to the gRPC server and reads a stream of transaction data. - - Calls the function `parse` to parse the transaction - - Validates the chain ID and transaction version. -4. Create a parser. - - In `grpc_parser.py`, we have implemented a `parse` function which accepts a `Transaction` as a parameter. - - The example code shows how to implement custom filtering and parse a `Transaction` and the associated `Event`'s. - - The function returns t. -5. Insert data rows into database. - - In the example, we use Postgres for the database and SQLAlchemy as the ORM. To run the example code, install the following: - ``` - python -m pip install psycopg2 - python -m pip install sqlalchemy - ``` - - In `grpc_client.py`, after the events are parsed, all the event objects are then added to the database. -6. Run `python grpc_client.py` to start indexing! - ## Typescript / Node ### Prerequisite - `node`: This requires Node 0.12.x or greater. diff --git a/python/Dockerfile b/python/Dockerfile index 5d7372aff..ed1ba256d 100644 --- a/python/Dockerfile +++ b/python/Dockerfile @@ -15,4 +15,4 @@ RUN poetry config virtualenvs.create false \ COPY *.py /app/ COPY /aptos /app/aptos -CMD ["poetry", "run", "python", "grpc_client.py", "--config", "/app/config/config.yaml"] +CMD ["poetry", "run", "python", "processor.py", "--config", "/app/config/config.yaml"] diff --git a/python/README.md b/python/README.md new file mode 100644 index 000000000..eb1b2b509 --- /dev/null +++ b/python/README.md @@ -0,0 +1,58 @@ +## Python Quickstart +### Prerequisite +- Python 3.7 or higher +- `pip` version 9.0.1 or higher +### Tutorial +1. Install the latest version of gRPC and tooling for Python: + ``` + python -m pip install grpcio + python -m pip install grpcio-tools + + ``` +2. Download the example: +``` +# Clone the repository to get the example code: +$ git clone https://github.com/aptos-labs/aptos-indexer-client-examples +# Navigate to the python folder +$ cd aptos-indexer-client-examples/python +``` +In this example, we are creating an event parser. +3. Create a processer. + - First you need to create an indexer processor that reads the stream of data. + - We've create an example client in `processor.py`. This client + - Connects to the gRPC server and reads a stream of transaction data. + - Calls the function `parse` to parse the transaction + - Validates the chain ID and transaction version. +4. Create a parser. + - In `grpc_parser.py`, we have implemented a `parse` function which accepts a `Transaction` as a parameter. + - The example code shows how to implement custom filtering and parse a `Transaction` and the associated `Event`'s. + - The function returns t. +5. Insert data rows into database. + - In the example, we use Postgres for the database and SQLAlchemy as the ORM. To run the example code, install the following: + ``` + python -m pip install psycopg2 + python -m pip install sqlalchemy + ``` + - In `grpc_client.py`, after the events are parsed, all the event objects are then added to the database. +6. Run `python grpc_client.py` to start indexing! + +## Development + +### Install all dependencies + +```bash +poetry install +``` + +### Linting & autoformatting + +```bash +poetry run poe pyright # typecheck +poetry run poe format # autoformat via black +``` + +### Run locally in Docker + +```bash +docker compose up --build --force-recreate +``` diff --git a/python/aptos/datastream/v1/datastream_pb2.py b/python/aptos/datastream/v1/datastream_pb2.py deleted file mode 100644 index e226b9f98..000000000 --- a/python/aptos/datastream/v1/datastream_pb2.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: aptos/datastream/v1/datastream.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from aptos.util.timestamp import timestamp_pb2 as aptos_dot_util_dot_timestamp_dot_timestamp__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$aptos/datastream/v1/datastream.proto\x12\x13\x61ptos.datastream.v1\x1a$aptos/util/timestamp/timestamp.proto\"R\n\x12TransactionsOutput\x12<\n\x0ctransactions\x18\x01 \x03(\x0b\x32&.aptos.datastream.v1.TransactionOutput\"t\n\x11TransactionOutput\x12\x1a\n\x12\x65ncoded_proto_data\x18\x01 \x01(\x0c\x12\x0f\n\x07version\x18\x02 \x01(\x04\x12\x32\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1f.aptos.util.timestamp.Timestamp\"\xe7\x01\n\x0cStreamStatus\x12:\n\x04type\x18\x01 \x01(\x0e\x32,.aptos.datastream.v1.StreamStatus.StatusType\x12\x15\n\rstart_version\x18\x02 \x01(\x04\x12\x18\n\x0b\x65nd_version\x18\x03 \x01(\x04H\x00\x88\x01\x01\"Z\n\nStatusType\x12\x1b\n\x17STATUS_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10STATUS_TYPE_INIT\x10\x01\x12\x19\n\x15STATUS_TYPE_BATCH_END\x10\x02\x42\x0e\n\x0c_end_version\"\x82\x01\n\x14RawDatastreamRequest\x12\x1d\n\x10starting_version\x18\x01 \x01(\x04H\x00\x88\x01\x01\x12\x1f\n\x12transactions_count\x18\x02 \x01(\x04H\x01\x88\x01\x01\x42\x13\n\x11_starting_versionB\x15\n\x13_transactions_count\"\xa3\x01\n\x15RawDatastreamResponse\x12\x33\n\x06status\x18\x01 \x01(\x0b\x32!.aptos.datastream.v1.StreamStatusH\x00\x12\x37\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\'.aptos.datastream.v1.TransactionsOutputH\x00\x12\x10\n\x08\x63hain_id\x18\x03 \x01(\rB\n\n\x08response2y\n\rIndexerStream\x12h\n\rRawDatastream\x12).aptos.datastream.v1.RawDatastreamRequest\x1a*.aptos.datastream.v1.RawDatastreamResponse0\x01\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'aptos.datastream.v1.datastream_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _TRANSACTIONSOUTPUT._serialized_start=99 - _TRANSACTIONSOUTPUT._serialized_end=181 - _TRANSACTIONOUTPUT._serialized_start=183 - _TRANSACTIONOUTPUT._serialized_end=299 - _STREAMSTATUS._serialized_start=302 - _STREAMSTATUS._serialized_end=533 - _STREAMSTATUS_STATUSTYPE._serialized_start=427 - _STREAMSTATUS_STATUSTYPE._serialized_end=517 - _RAWDATASTREAMREQUEST._serialized_start=536 - _RAWDATASTREAMREQUEST._serialized_end=666 - _RAWDATASTREAMRESPONSE._serialized_start=669 - _RAWDATASTREAMRESPONSE._serialized_end=832 - _INDEXERSTREAM._serialized_start=834 - _INDEXERSTREAM._serialized_end=955 -# @@protoc_insertion_point(module_scope) diff --git a/python/aptos/datastream/v1/datastream_pb2.pyi b/python/aptos/datastream/v1/datastream_pb2.pyi deleted file mode 100644 index e633c29e6..000000000 --- a/python/aptos/datastream/v1/datastream_pb2.pyi +++ /dev/null @@ -1,57 +0,0 @@ -from aptos.util.timestamp import timestamp_pb2 as _timestamp_pb2 -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class RawDatastreamRequest(_message.Message): - __slots__ = ["starting_version", "transactions_count"] - STARTING_VERSION_FIELD_NUMBER: _ClassVar[int] - TRANSACTIONS_COUNT_FIELD_NUMBER: _ClassVar[int] - starting_version: int - transactions_count: int - def __init__(self, starting_version: _Optional[int] = ..., transactions_count: _Optional[int] = ...) -> None: ... - -class RawDatastreamResponse(_message.Message): - __slots__ = ["chain_id", "data", "status"] - CHAIN_ID_FIELD_NUMBER: _ClassVar[int] - DATA_FIELD_NUMBER: _ClassVar[int] - STATUS_FIELD_NUMBER: _ClassVar[int] - chain_id: int - data: TransactionsOutput - status: StreamStatus - def __init__(self, status: _Optional[_Union[StreamStatus, _Mapping]] = ..., data: _Optional[_Union[TransactionsOutput, _Mapping]] = ..., chain_id: _Optional[int] = ...) -> None: ... - -class StreamStatus(_message.Message): - __slots__ = ["end_version", "start_version", "type"] - class StatusType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = [] - END_VERSION_FIELD_NUMBER: _ClassVar[int] - START_VERSION_FIELD_NUMBER: _ClassVar[int] - STATUS_TYPE_BATCH_END: StreamStatus.StatusType - STATUS_TYPE_INIT: StreamStatus.StatusType - STATUS_TYPE_UNSPECIFIED: StreamStatus.StatusType - TYPE_FIELD_NUMBER: _ClassVar[int] - end_version: int - start_version: int - type: StreamStatus.StatusType - def __init__(self, type: _Optional[_Union[StreamStatus.StatusType, str]] = ..., start_version: _Optional[int] = ..., end_version: _Optional[int] = ...) -> None: ... - -class TransactionOutput(_message.Message): - __slots__ = ["encoded_proto_data", "timestamp", "version"] - ENCODED_PROTO_DATA_FIELD_NUMBER: _ClassVar[int] - TIMESTAMP_FIELD_NUMBER: _ClassVar[int] - VERSION_FIELD_NUMBER: _ClassVar[int] - encoded_proto_data: bytes - timestamp: _timestamp_pb2.Timestamp - version: int - def __init__(self, encoded_proto_data: _Optional[bytes] = ..., version: _Optional[int] = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... - -class TransactionsOutput(_message.Message): - __slots__ = ["transactions"] - TRANSACTIONS_FIELD_NUMBER: _ClassVar[int] - transactions: _containers.RepeatedCompositeFieldContainer[TransactionOutput] - def __init__(self, transactions: _Optional[_Iterable[_Union[TransactionOutput, _Mapping]]] = ...) -> None: ... diff --git a/python/aptos/datastream/v1/datastream_pb2_grpc.py b/python/aptos/datastream/v1/datastream_pb2_grpc.py deleted file mode 100644 index 37fd9d877..000000000 --- a/python/aptos/datastream/v1/datastream_pb2_grpc.py +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - -from aptos.datastream.v1 import datastream_pb2 as aptos_dot_datastream_dot_v1_dot_datastream__pb2 - - -class IndexerStreamStub(object): - """Missing associated documentation comment in .proto file.""" - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.RawDatastream = channel.unary_stream( - '/aptos.datastream.v1.IndexerStream/RawDatastream', - request_serializer=aptos_dot_datastream_dot_v1_dot_datastream__pb2.RawDatastreamRequest.SerializeToString, - response_deserializer=aptos_dot_datastream_dot_v1_dot_datastream__pb2.RawDatastreamResponse.FromString, - ) - - -class IndexerStreamServicer(object): - """Missing associated documentation comment in .proto file.""" - - def RawDatastream(self, request, context): - """Missing associated documentation comment in .proto file.""" - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_IndexerStreamServicer_to_server(servicer, server): - rpc_method_handlers = { - 'RawDatastream': grpc.unary_stream_rpc_method_handler( - servicer.RawDatastream, - request_deserializer=aptos_dot_datastream_dot_v1_dot_datastream__pb2.RawDatastreamRequest.FromString, - response_serializer=aptos_dot_datastream_dot_v1_dot_datastream__pb2.RawDatastreamResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'aptos.datastream.v1.IndexerStream', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class IndexerStream(object): - """Missing associated documentation comment in .proto file.""" - - @staticmethod - def RawDatastream(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_stream(request, target, '/aptos.datastream.v1.IndexerStream/RawDatastream', - aptos_dot_datastream_dot_v1_dot_datastream__pb2.RawDatastreamRequest.SerializeToString, - aptos_dot_datastream_dot_v1_dot_datastream__pb2.RawDatastreamResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/python/aptos/indexer/v1/raw_data_pb2.py b/python/aptos/indexer/v1/raw_data_pb2.py new file mode 100644 index 000000000..d6de3b929 --- /dev/null +++ b/python/aptos/indexer/v1/raw_data_pb2.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: aptos/indexer/v1/raw_data.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from aptos.transaction.testing1.v1 import transaction_pb2 as aptos_dot_transaction_dot_testing1_dot_v1_dot_transaction__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1f\x61ptos/indexer/v1/raw_data.proto\x12\x10\x61ptos.indexer.v1\x1a/aptos/transaction/testing1/v1/transaction.proto\"\x84\x01\n\x16GetTransactionsRequest\x12\x1d\n\x10starting_version\x18\x01 \x01(\x04H\x00\x88\x01\x01\x12\x1f\n\x12transactions_count\x18\x02 \x01(\x04H\x01\x88\x01\x01\x42\x13\n\x11_starting_versionB\x15\n\x13_transactions_count\"|\n\x14TransactionsResponse\x12@\n\x0ctransactions\x18\x01 \x03(\x0b\x32*.aptos.transaction.testing1.v1.Transaction\x12\x15\n\x08\x63hain_id\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\x0b\n\t_chain_id2p\n\x07RawData\x12\x65\n\x0fGetTransactions\x12(.aptos.indexer.v1.GetTransactionsRequest\x1a&.aptos.indexer.v1.TransactionsResponse0\x01\x62\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'aptos.indexer.v1.raw_data_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _GETTRANSACTIONSREQUEST._serialized_start=103 + _GETTRANSACTIONSREQUEST._serialized_end=235 + _TRANSACTIONSRESPONSE._serialized_start=237 + _TRANSACTIONSRESPONSE._serialized_end=361 + _RAWDATA._serialized_start=363 + _RAWDATA._serialized_end=475 +# @@protoc_insertion_point(module_scope) diff --git a/python/aptos/indexer/v1/raw_data_pb2.pyi b/python/aptos/indexer/v1/raw_data_pb2.pyi new file mode 100644 index 000000000..6c70fac36 --- /dev/null +++ b/python/aptos/indexer/v1/raw_data_pb2.pyi @@ -0,0 +1,23 @@ +from aptos.transaction.testing1.v1 import transaction_pb2 as _transaction_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class GetTransactionsRequest(_message.Message): + __slots__ = ["starting_version", "transactions_count"] + STARTING_VERSION_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONS_COUNT_FIELD_NUMBER: _ClassVar[int] + starting_version: int + transactions_count: int + def __init__(self, starting_version: _Optional[int] = ..., transactions_count: _Optional[int] = ...) -> None: ... + +class TransactionsResponse(_message.Message): + __slots__ = ["chain_id", "transactions"] + CHAIN_ID_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONS_FIELD_NUMBER: _ClassVar[int] + chain_id: int + transactions: _containers.RepeatedCompositeFieldContainer[_transaction_pb2.Transaction] + def __init__(self, transactions: _Optional[_Iterable[_Union[_transaction_pb2.Transaction, _Mapping]]] = ..., chain_id: _Optional[int] = ...) -> None: ... diff --git a/python/aptos/indexer/v1/raw_data_pb2_grpc.py b/python/aptos/indexer/v1/raw_data_pb2_grpc.py new file mode 100644 index 000000000..c7975be67 --- /dev/null +++ b/python/aptos/indexer/v1/raw_data_pb2_grpc.py @@ -0,0 +1,67 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from aptos.indexer.v1 import raw_data_pb2 as aptos_dot_indexer_dot_v1_dot_raw__data__pb2 + + +class RawDataStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetTransactions = channel.unary_stream( + '/aptos.indexer.v1.RawData/GetTransactions', + request_serializer=aptos_dot_indexer_dot_v1_dot_raw__data__pb2.GetTransactionsRequest.SerializeToString, + response_deserializer=aptos_dot_indexer_dot_v1_dot_raw__data__pb2.TransactionsResponse.FromString, + ) + + +class RawDataServicer(object): + """Missing associated documentation comment in .proto file.""" + + def GetTransactions(self, request, context): + """Get transactions batch without any filtering from starting version and end if transaction count is present. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_RawDataServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetTransactions': grpc.unary_stream_rpc_method_handler( + servicer.GetTransactions, + request_deserializer=aptos_dot_indexer_dot_v1_dot_raw__data__pb2.GetTransactionsRequest.FromString, + response_serializer=aptos_dot_indexer_dot_v1_dot_raw__data__pb2.TransactionsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'aptos.indexer.v1.RawData', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class RawData(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GetTransactions(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/aptos.indexer.v1.RawData/GetTransactions', + aptos_dot_indexer_dot_v1_dot_raw__data__pb2.GetTransactionsRequest.SerializeToString, + aptos_dot_indexer_dot_v1_dot_raw__data__pb2.TransactionsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/python/compile_profobuf.sh b/python/compile_profobuf.sh new file mode 100755 index 000000000..8b97aa3dc --- /dev/null +++ b/python/compile_profobuf.sh @@ -0,0 +1,2 @@ +PATH_TO_APTOS_CORE=${PATH_TO_APTOS_CORE:-"../../aptos-core"} +python3 -m grpc_tools.protoc --proto_path=$PATH_TO_APTOS_CORE"/crates/aptos-protos/proto/" aptos/indexer/v1/raw_data.proto aptos/util/timestamp/timestamp.proto aptos/transaction/testing1/v1/transaction.proto --python_out=. --pyi_out=. --grpc_python_out=. diff --git a/python/config.py b/python/config.py index 0b0c2c481..f01e023db 100644 --- a/python/config.py +++ b/python/config.py @@ -1,5 +1,5 @@ import yaml -from pydantic import BaseSettings +from pydantic import BaseSettings, Field from pydantic.env_settings import SettingsSourceCallable @@ -7,9 +7,8 @@ class Config(BaseSettings): chain_id: int indexer_endpoint: str indexer_api_key: str - starting_version: int + starting_version: int | None = None db_connection_uri: str - cursor_filename: str class Config: # change order of priority of settings sources such that environment variables take precedence over config file settings @@ -27,4 +26,5 @@ def customise_sources( def from_yaml_file(cls, path: str): with open(path, "r") as file: config = yaml.safe_load(file) + return cls(**config) diff --git a/config.yaml b/python/config.yaml similarity index 74% rename from config.yaml rename to python/config.yaml index d270440b1..b4c713d58 100644 --- a/config.yaml +++ b/python/config.yaml @@ -1,6 +1,4 @@ chain_id: 1 indexer_endpoint: "34.30.218.153:50051" indexer_api_key: "" -starting_version: 10000 db_connection_uri: "postgresql://" -cursor_filename: "cursor.txt" diff --git a/python/create_table.py b/python/create_table.py index 127e8bad9..782f63ad1 100644 --- a/python/create_table.py +++ b/python/create_table.py @@ -1,31 +1,45 @@ -from sqlalchemy import BigInteger, Column, create_engine, DateTime, String -from sqlalchemy.orm import declarative_base - +from sqlalchemy import BigInteger, create_engine, DateTime, func, String +from sqlalchemy.orm import DeclarativeBase, mapped_column, Mapped +from datetime import datetime import argparse - from config import Config + +class Base(DeclarativeBase): + pass + + parser = argparse.ArgumentParser() parser.add_argument("-c", "--config", help="Path to config file", required=True) args = parser.parse_args() config = Config.from_yaml_file(args.config) -Base = declarative_base() - class Event(Base): __tablename__ = "events" - sequence_number = Column(BigInteger, primary_key=True) - creation_number = Column(BigInteger, primary_key=True) - account_address = Column(String, primary_key=True) - transaction_version = Column(BigInteger) - transaction_block_height = Column(BigInteger) - type = Column(String) - data = Column(String) - inserted_at = Column(DateTime) - event_index = Column(BigInteger) + sequence_number: Mapped[int] = mapped_column(BigInteger, primary_key=True) + creation_number: Mapped[int] = mapped_column(BigInteger, primary_key=True) + account_address: Mapped[str] = mapped_column(String, primary_key=True) + transaction_version: Mapped[int] = mapped_column(BigInteger) + transaction_block_height: Mapped[int] = mapped_column(BigInteger) + type: Mapped[str] + data: Mapped[str] + inserted_at: Mapped[datetime] = mapped_column(DateTime(timezone=True)) + event_index: Mapped[int] = mapped_column(BigInteger) + + +class LatestProcessedVersion(Base): + __tablename__ = "latest_processed_versions" + + indexer_name: Mapped[str] = mapped_column(primary_key=True) + latest_processed_version: Mapped[int] = mapped_column(BigInteger) + updated_at: Mapped[datetime] = mapped_column( + DateTime(timezone=True), + default=func.now(), + onupdate=func.now(), + ) engine = create_engine(config.db_connection_uri) diff --git a/python/docker-compose.yml b/python/docker-compose.yml index db1dcbd6a..0a61733e2 100644 --- a/python/docker-compose.yml +++ b/python/docker-compose.yml @@ -7,7 +7,7 @@ services: depends_on: - db volumes: - - ../config.yaml:/app/config/config.yaml + - ./config.yaml:/app/config/config.yaml db: image: postgres:15.2 environment: diff --git a/python/grpc_parser.py b/python/event_parser.py similarity index 94% rename from python/grpc_parser.py rename to python/event_parser.py index c936f81b0..e08731a86 100644 --- a/python/grpc_parser.py +++ b/python/event_parser.py @@ -3,6 +3,9 @@ from create_table import Event import datetime +# INDEXER_NAME is used to track the latest processed version +INDEXER_NAME = "python_example_indexer" + def parse(transaction: transaction_pb2.Transaction): # Custom filtering diff --git a/python/poetry.lock b/python/poetry.lock index 6a0ca04e9..bdc2d9dd5 100644 --- a/python/poetry.lock +++ b/python/poetry.lock @@ -279,6 +279,21 @@ files = [ {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] +[[package]] +name = "nodeenv" +version = "1.7.0" +description = "Node.js virtual environment builder" +category = "dev" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" +files = [ + {file = "nodeenv-1.7.0-py2.py3-none-any.whl", hash = "sha256:27083a7b96a25f2f5e1d8cb4b6317ee8aeda3bdd121394e5ac54e498028a042e"}, + {file = "nodeenv-1.7.0.tar.gz", hash = "sha256:e0e7f7dfb85fc5394c6fe1e8fa98131a2473e04311a45afb6508f7cf1836fa2b"}, +] + +[package.dependencies] +setuptools = "*" + [[package]] name = "packaging" version = "23.1" @@ -291,6 +306,18 @@ files = [ {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, ] +[[package]] +name = "pastel" +version = "0.2.1" +description = "Bring colors to your terminal." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"}, + {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, +] + [[package]] name = "pathspec" version = "0.11.1" @@ -319,6 +346,25 @@ files = [ docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] +[[package]] +name = "poethepoet" +version = "0.19.0" +description = "A task runner that works well with poetry." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "poethepoet-0.19.0-py3-none-any.whl", hash = "sha256:87038be589077e4b407050a9da644d9cd9e4076ccfc8abc7f855cf6870d5c6c2"}, + {file = "poethepoet-0.19.0.tar.gz", hash = "sha256:897eb85ec15876d79befc7d19d4c80ce7c8b214d1bb0dcfec640abd81616bfed"}, +] + +[package.dependencies] +pastel = ">=0.2.1,<0.3.0" +tomli = ">=1.2.2" + +[package.extras] +poetry-plugin = ["poetry (>=1.0,<2.0)"] + [[package]] name = "protobuf" version = "4.22.3" @@ -418,6 +464,25 @@ typing-extensions = ">=4.2.0" dotenv = ["python-dotenv (>=0.10.4)"] email = ["email-validator (>=1.0.3)"] +[[package]] +name = "pyright" +version = "1.1.305" +description = "Command line wrapper for pyright" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pyright-1.1.305-py3-none-any.whl", hash = "sha256:147da3aac44ba0516423613cad5fbb7a0abba6b71c53718a1e151f456d4ab12e"}, + {file = "pyright-1.1.305.tar.gz", hash = "sha256:924d554253ecc4fafdfbfa76989d173cc15d426aa808630c0dd669fdc3227ef7"}, +] + +[package.dependencies] +nodeenv = ">=1.6.0" + +[package.extras] +all = ["twine (>=3.4.1)"] +dev = ["twine (>=3.4.1)"] + [[package]] name = "pyyaml" version = "6.0" @@ -563,6 +628,18 @@ postgresql-psycopg2cffi = ["psycopg2cffi"] pymysql = ["pymysql"] sqlcipher = ["sqlcipher3-binary"] +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + [[package]] name = "typing-extensions" version = "4.5.0" @@ -578,4 +655,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "f34a2d7a5d23cadc3b429711c473a77c510232e8f1a4ec7f269f0074254d9981" +content-hash = "1e236b132d25b9a39e703aa5fc8a875aeb2209a1ef47f77add38de1b45cf715b" diff --git a/python/grpc_client.py b/python/processor.py similarity index 50% rename from python/grpc_client.py rename to python/processor.py index 49b1328c5..6a0a866be 100644 --- a/python/grpc_client.py +++ b/python/processor.py @@ -1,19 +1,18 @@ from config import Config -from grpc_parser import parse -from aptos.datastream.v1 import datastream_pb2_grpc +from create_table import LatestProcessedVersion +from event_parser import INDEXER_NAME, parse +from aptos.indexer.v1 import raw_data_pb2_grpc import grpc -from aptos.datastream.v1 import datastream_pb2 -from aptos.transaction.testing1.v1 import transaction_pb2 +from aptos.indexer.v1 import raw_data_pb2 from sqlalchemy import create_engine from sqlalchemy.orm import Session import argparse -import base64 -import datetime import json + parser = argparse.ArgumentParser() parser.add_argument("-c", "--config", help="Path to config file", required=True) args = parser.parse_args() @@ -23,12 +22,34 @@ options = [("grpc.max_receive_message_length", -1)] engine = create_engine(config.db_connection_uri) +starting_version = 0 +if config.starting_version != None: + # Start from config's starting version if set + starting_version = config.starting_version +else: + # Start from latest processed version in db + with Session(engine) as session, session.begin(): + latest_processed_version_from_db = session.get( + LatestProcessedVersion, INDEXER_NAME + ) + if latest_processed_version_from_db != None: + starting_version = latest_processed_version_from_db.latest_processed_version + +print( + json.dumps( + { + "message": "Connected to the indexer grpc", + "starting_version": starting_version, + } + ) +) +# Connect to grpc with grpc.insecure_channel(config.indexer_endpoint, options=options) as channel: - stub = datastream_pb2_grpc.IndexerStreamStub(channel) - current_transaction_version = config.starting_version + stub = raw_data_pb2_grpc.RawDataStub(channel) + current_transaction_version = starting_version - for response in stub.RawDatastream( - datastream_pb2.RawDatastreamRequest(starting_version=config.starting_version), + for response in stub.GetTransactions( + raw_data_pb2.GetTransactionsRequest(starting_version=starting_version), metadata=metadata, ): chain_id = response.chain_id @@ -40,16 +61,16 @@ + ", but received chain ID is: " + str(chain_id) ) - - transactions_output = response.data - for transaction_output in transactions_output.transactions: - # Decode transaction data - decoded_transaction = base64.b64decode( - transaction_output.encoded_proto_data + print( + json.dumps( + { + "message": "Response received", + "starting_version": response.transactions[0].version, + } ) - transaction = transaction_pb2.Transaction() - transaction.ParseFromString(decoded_transaction) - + ) + transactions_output = response + for transaction in transactions_output.transactions: transaction_version = transaction.version if transaction_version != current_transaction_version: raise Exception( @@ -59,14 +80,21 @@ + str(transaction_version) ) - current_transaction_version += 1 parsed_objs = parse(transaction) - if parsed_objs is not None: - # Insert objects into database - with Session(engine) as session, session.begin(): + with Session(engine) as session, session.begin(): + # Insert Events into database + if parsed_objs is not None: session.add_all(parsed_objs) + # Update latest processed version + session.merge( + LatestProcessedVersion( + indexer_name=INDEXER_NAME, + latest_processed_version=current_transaction_version, + ) + ) + if (current_transaction_version % 1000) == 0: print( json.dumps( @@ -76,15 +104,5 @@ } ) ) - # Keep track of last successfully processed transaction version - cursor_file = open(config.cursor_filename, "w+") - cursor_file.write( - "last_success_transaction_version=" - + str(current_transaction_version) - + "\n" - ) - cursor_file.write( - "last_updated=" - + datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f") - ) - cursor_file.close() + + current_transaction_version += 1 diff --git a/python/pyproject.toml b/python/pyproject.toml index 4337f340c..74dc0779b 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -5,6 +5,12 @@ description = "" authors = ["Your Name "] readme = "README.md" +[tool.poe.tasks] +lint = ["pyright", "format-check"] +pyright = "pyright" +format-check = "black --diff --check --exclude aptos ." +format = "black --exclude aptos ." + [tool.poetry.dependencies] python = "^3.11" grpcio = "^1.53.0" @@ -18,7 +24,12 @@ pydantic = "^1.10.7" [tool.poetry.group.dev.dependencies] grpcio-tools = "^1.53.0" black = "^23.3.0" +pyright = "^1.1.305" +poethepoet = "^0.19.0" [build-system] requires = ["poetry-core>=1.4.2"] build-backend = "poetry.core.masonry.api" + +[tool.pyright] +exclude = ["aptos"] diff --git a/typescript/aptos/datastream/v1/datastream_pb.d.ts b/typescript/aptos/datastream/v1/datastream_pb.d.ts deleted file mode 100644 index f1026a590..000000000 --- a/typescript/aptos/datastream/v1/datastream_pb.d.ts +++ /dev/null @@ -1,165 +0,0 @@ -// package: aptos.datastream.v1 -// file: aptos/datastream/v1/datastream.proto - -import * as jspb from "google-protobuf"; -import * as aptos_util_timestamp_timestamp_pb from "../../../aptos/util/timestamp/timestamp_pb"; - -export class TransactionsOutput extends jspb.Message { - clearTransactionsList(): void; - getTransactionsList(): Array; - setTransactionsList(value: Array): void; - addTransactions(value?: TransactionOutput, index?: number): TransactionOutput; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TransactionsOutput.AsObject; - static toObject(includeInstance: boolean, msg: TransactionsOutput): TransactionsOutput.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TransactionsOutput, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TransactionsOutput; - static deserializeBinaryFromReader(message: TransactionsOutput, reader: jspb.BinaryReader): TransactionsOutput; -} - -export namespace TransactionsOutput { - export type AsObject = { - transactionsList: Array, - } -} - -export class TransactionOutput extends jspb.Message { - getEncodedProtoData(): Uint8Array | string; - getEncodedProtoData_asU8(): Uint8Array; - getEncodedProtoData_asB64(): string; - setEncodedProtoData(value: Uint8Array | string): void; - - getVersion(): number; - setVersion(value: number): void; - - hasTimestamp(): boolean; - clearTimestamp(): void; - getTimestamp(): aptos_util_timestamp_timestamp_pb.Timestamp | undefined; - setTimestamp(value?: aptos_util_timestamp_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TransactionOutput.AsObject; - static toObject(includeInstance: boolean, msg: TransactionOutput): TransactionOutput.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TransactionOutput, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TransactionOutput; - static deserializeBinaryFromReader(message: TransactionOutput, reader: jspb.BinaryReader): TransactionOutput; -} - -export namespace TransactionOutput { - export type AsObject = { - encodedProtoData: Uint8Array | string, - version: number, - timestamp?: aptos_util_timestamp_timestamp_pb.Timestamp.AsObject, - } -} - -export class StreamStatus extends jspb.Message { - getType(): StreamStatus.StatusTypeMap[keyof StreamStatus.StatusTypeMap]; - setType(value: StreamStatus.StatusTypeMap[keyof StreamStatus.StatusTypeMap]): void; - - getStartVersion(): number; - setStartVersion(value: number): void; - - hasEndVersion(): boolean; - clearEndVersion(): void; - getEndVersion(): number; - setEndVersion(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StreamStatus.AsObject; - static toObject(includeInstance: boolean, msg: StreamStatus): StreamStatus.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StreamStatus, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StreamStatus; - static deserializeBinaryFromReader(message: StreamStatus, reader: jspb.BinaryReader): StreamStatus; -} - -export namespace StreamStatus { - export type AsObject = { - type: StreamStatus.StatusTypeMap[keyof StreamStatus.StatusTypeMap], - startVersion: number, - endVersion: number, - } - - export interface StatusTypeMap { - STATUS_TYPE_UNSPECIFIED: 0; - STATUS_TYPE_INIT: 1; - STATUS_TYPE_BATCH_END: 2; - } - - export const StatusType: StatusTypeMap; -} - -export class RawDatastreamRequest extends jspb.Message { - hasStartingVersion(): boolean; - clearStartingVersion(): void; - getStartingVersion(): number; - setStartingVersion(value: number): void; - - hasTransactionsCount(): boolean; - clearTransactionsCount(): void; - getTransactionsCount(): number; - setTransactionsCount(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RawDatastreamRequest.AsObject; - static toObject(includeInstance: boolean, msg: RawDatastreamRequest): RawDatastreamRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RawDatastreamRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RawDatastreamRequest; - static deserializeBinaryFromReader(message: RawDatastreamRequest, reader: jspb.BinaryReader): RawDatastreamRequest; -} - -export namespace RawDatastreamRequest { - export type AsObject = { - startingVersion: number, - transactionsCount: number, - } -} - -export class RawDatastreamResponse extends jspb.Message { - hasStatus(): boolean; - clearStatus(): void; - getStatus(): StreamStatus | undefined; - setStatus(value?: StreamStatus): void; - - hasData(): boolean; - clearData(): void; - getData(): TransactionsOutput | undefined; - setData(value?: TransactionsOutput): void; - - getChainId(): number; - setChainId(value: number): void; - - getResponseCase(): RawDatastreamResponse.ResponseCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RawDatastreamResponse.AsObject; - static toObject(includeInstance: boolean, msg: RawDatastreamResponse): RawDatastreamResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RawDatastreamResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RawDatastreamResponse; - static deserializeBinaryFromReader(message: RawDatastreamResponse, reader: jspb.BinaryReader): RawDatastreamResponse; -} - -export namespace RawDatastreamResponse { - export type AsObject = { - status?: StreamStatus.AsObject, - data?: TransactionsOutput.AsObject, - chainId: number, - } - - export enum ResponseCase { - RESPONSE_NOT_SET = 0, - STATUS = 1, - DATA = 2, - } -} - diff --git a/typescript/aptos/datastream/v1/datastream_pb.js b/typescript/aptos/datastream/v1/datastream_pb.js deleted file mode 100644 index 31190a158..000000000 --- a/typescript/aptos/datastream/v1/datastream_pb.js +++ /dev/null @@ -1,1204 +0,0 @@ -// source: aptos/datastream/v1/datastream.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var aptos_util_timestamp_timestamp_pb = require('../../../aptos/util/timestamp/timestamp_pb.js'); -goog.object.extend(proto, aptos_util_timestamp_timestamp_pb); -goog.exportSymbol('proto.aptos.datastream.v1.RawDatastreamRequest', null, global); -goog.exportSymbol('proto.aptos.datastream.v1.RawDatastreamResponse', null, global); -goog.exportSymbol('proto.aptos.datastream.v1.RawDatastreamResponse.ResponseCase', null, global); -goog.exportSymbol('proto.aptos.datastream.v1.StreamStatus', null, global); -goog.exportSymbol('proto.aptos.datastream.v1.StreamStatus.StatusType', null, global); -goog.exportSymbol('proto.aptos.datastream.v1.TransactionOutput', null, global); -goog.exportSymbol('proto.aptos.datastream.v1.TransactionsOutput', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.aptos.datastream.v1.TransactionsOutput = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aptos.datastream.v1.TransactionsOutput.repeatedFields_, null); -}; -goog.inherits(proto.aptos.datastream.v1.TransactionsOutput, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.aptos.datastream.v1.TransactionsOutput.displayName = 'proto.aptos.datastream.v1.TransactionsOutput'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.aptos.datastream.v1.TransactionOutput = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.aptos.datastream.v1.TransactionOutput, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.aptos.datastream.v1.TransactionOutput.displayName = 'proto.aptos.datastream.v1.TransactionOutput'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.aptos.datastream.v1.StreamStatus = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.aptos.datastream.v1.StreamStatus, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.aptos.datastream.v1.StreamStatus.displayName = 'proto.aptos.datastream.v1.StreamStatus'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.aptos.datastream.v1.RawDatastreamRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.aptos.datastream.v1.RawDatastreamRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.aptos.datastream.v1.RawDatastreamRequest.displayName = 'proto.aptos.datastream.v1.RawDatastreamRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.aptos.datastream.v1.RawDatastreamResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aptos.datastream.v1.RawDatastreamResponse.oneofGroups_); -}; -goog.inherits(proto.aptos.datastream.v1.RawDatastreamResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.aptos.datastream.v1.RawDatastreamResponse.displayName = 'proto.aptos.datastream.v1.RawDatastreamResponse'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.aptos.datastream.v1.TransactionsOutput.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.aptos.datastream.v1.TransactionsOutput.prototype.toObject = function(opt_includeInstance) { - return proto.aptos.datastream.v1.TransactionsOutput.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aptos.datastream.v1.TransactionsOutput} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aptos.datastream.v1.TransactionsOutput.toObject = function(includeInstance, msg) { - var f, obj = { - transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), - proto.aptos.datastream.v1.TransactionOutput.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aptos.datastream.v1.TransactionsOutput} - */ -proto.aptos.datastream.v1.TransactionsOutput.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aptos.datastream.v1.TransactionsOutput; - return proto.aptos.datastream.v1.TransactionsOutput.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.aptos.datastream.v1.TransactionsOutput} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aptos.datastream.v1.TransactionsOutput} - */ -proto.aptos.datastream.v1.TransactionsOutput.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aptos.datastream.v1.TransactionOutput; - reader.readMessage(value,proto.aptos.datastream.v1.TransactionOutput.deserializeBinaryFromReader); - msg.addTransactions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.aptos.datastream.v1.TransactionsOutput.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aptos.datastream.v1.TransactionsOutput.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aptos.datastream.v1.TransactionsOutput} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aptos.datastream.v1.TransactionsOutput.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTransactionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.aptos.datastream.v1.TransactionOutput.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated TransactionOutput transactions = 1; - * @return {!Array} - */ -proto.aptos.datastream.v1.TransactionsOutput.prototype.getTransactionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aptos.datastream.v1.TransactionOutput, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.aptos.datastream.v1.TransactionsOutput} returns this -*/ -proto.aptos.datastream.v1.TransactionsOutput.prototype.setTransactionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.aptos.datastream.v1.TransactionOutput=} opt_value - * @param {number=} opt_index - * @return {!proto.aptos.datastream.v1.TransactionOutput} - */ -proto.aptos.datastream.v1.TransactionsOutput.prototype.addTransactions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aptos.datastream.v1.TransactionOutput, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.aptos.datastream.v1.TransactionsOutput} returns this - */ -proto.aptos.datastream.v1.TransactionsOutput.prototype.clearTransactionsList = function() { - return this.setTransactionsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.aptos.datastream.v1.TransactionOutput.prototype.toObject = function(opt_includeInstance) { - return proto.aptos.datastream.v1.TransactionOutput.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aptos.datastream.v1.TransactionOutput} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aptos.datastream.v1.TransactionOutput.toObject = function(includeInstance, msg) { - var f, obj = { - encodedProtoData: msg.getEncodedProtoData_asB64(), - version: jspb.Message.getFieldWithDefault(msg, 2, 0), - timestamp: (f = msg.getTimestamp()) && aptos_util_timestamp_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aptos.datastream.v1.TransactionOutput} - */ -proto.aptos.datastream.v1.TransactionOutput.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aptos.datastream.v1.TransactionOutput; - return proto.aptos.datastream.v1.TransactionOutput.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.aptos.datastream.v1.TransactionOutput} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aptos.datastream.v1.TransactionOutput} - */ -proto.aptos.datastream.v1.TransactionOutput.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEncodedProtoData(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setVersion(value); - break; - case 3: - var value = new aptos_util_timestamp_timestamp_pb.Timestamp; - reader.readMessage(value,aptos_util_timestamp_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTimestamp(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.aptos.datastream.v1.TransactionOutput.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aptos.datastream.v1.TransactionOutput.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aptos.datastream.v1.TransactionOutput} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aptos.datastream.v1.TransactionOutput.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEncodedProtoData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getVersion(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getTimestamp(); - if (f != null) { - writer.writeMessage( - 3, - f, - aptos_util_timestamp_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes encoded_proto_data = 1; - * @return {!(string|Uint8Array)} - */ -proto.aptos.datastream.v1.TransactionOutput.prototype.getEncodedProtoData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes encoded_proto_data = 1; - * This is a type-conversion wrapper around `getEncodedProtoData()` - * @return {string} - */ -proto.aptos.datastream.v1.TransactionOutput.prototype.getEncodedProtoData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEncodedProtoData())); -}; - - -/** - * optional bytes encoded_proto_data = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEncodedProtoData()` - * @return {!Uint8Array} - */ -proto.aptos.datastream.v1.TransactionOutput.prototype.getEncodedProtoData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEncodedProtoData())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.aptos.datastream.v1.TransactionOutput} returns this - */ -proto.aptos.datastream.v1.TransactionOutput.prototype.setEncodedProtoData = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional uint64 version = 2; - * @return {number} - */ -proto.aptos.datastream.v1.TransactionOutput.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.aptos.datastream.v1.TransactionOutput} returns this - */ -proto.aptos.datastream.v1.TransactionOutput.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional aptos.util.timestamp.Timestamp timestamp = 3; - * @return {?proto.aptos.util.timestamp.Timestamp} - */ -proto.aptos.datastream.v1.TransactionOutput.prototype.getTimestamp = function() { - return /** @type{?proto.aptos.util.timestamp.Timestamp} */ ( - jspb.Message.getWrapperField(this, aptos_util_timestamp_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.aptos.util.timestamp.Timestamp|undefined} value - * @return {!proto.aptos.datastream.v1.TransactionOutput} returns this -*/ -proto.aptos.datastream.v1.TransactionOutput.prototype.setTimestamp = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.aptos.datastream.v1.TransactionOutput} returns this - */ -proto.aptos.datastream.v1.TransactionOutput.prototype.clearTimestamp = function() { - return this.setTimestamp(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aptos.datastream.v1.TransactionOutput.prototype.hasTimestamp = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.aptos.datastream.v1.StreamStatus.prototype.toObject = function(opt_includeInstance) { - return proto.aptos.datastream.v1.StreamStatus.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aptos.datastream.v1.StreamStatus} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aptos.datastream.v1.StreamStatus.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - startVersion: jspb.Message.getFieldWithDefault(msg, 2, 0), - endVersion: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aptos.datastream.v1.StreamStatus} - */ -proto.aptos.datastream.v1.StreamStatus.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aptos.datastream.v1.StreamStatus; - return proto.aptos.datastream.v1.StreamStatus.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.aptos.datastream.v1.StreamStatus} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aptos.datastream.v1.StreamStatus} - */ -proto.aptos.datastream.v1.StreamStatus.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.aptos.datastream.v1.StreamStatus.StatusType} */ (reader.readEnum()); - msg.setType(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStartVersion(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setEndVersion(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.aptos.datastream.v1.StreamStatus.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aptos.datastream.v1.StreamStatus.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aptos.datastream.v1.StreamStatus} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aptos.datastream.v1.StreamStatus.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getStartVersion(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint64( - 3, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.aptos.datastream.v1.StreamStatus.StatusType = { - STATUS_TYPE_UNSPECIFIED: 0, - STATUS_TYPE_INIT: 1, - STATUS_TYPE_BATCH_END: 2 -}; - -/** - * optional StatusType type = 1; - * @return {!proto.aptos.datastream.v1.StreamStatus.StatusType} - */ -proto.aptos.datastream.v1.StreamStatus.prototype.getType = function() { - return /** @type {!proto.aptos.datastream.v1.StreamStatus.StatusType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.aptos.datastream.v1.StreamStatus.StatusType} value - * @return {!proto.aptos.datastream.v1.StreamStatus} returns this - */ -proto.aptos.datastream.v1.StreamStatus.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional uint64 start_version = 2; - * @return {number} - */ -proto.aptos.datastream.v1.StreamStatus.prototype.getStartVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.aptos.datastream.v1.StreamStatus} returns this - */ -proto.aptos.datastream.v1.StreamStatus.prototype.setStartVersion = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 end_version = 3; - * @return {number} - */ -proto.aptos.datastream.v1.StreamStatus.prototype.getEndVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.aptos.datastream.v1.StreamStatus} returns this - */ -proto.aptos.datastream.v1.StreamStatus.prototype.setEndVersion = function(value) { - return jspb.Message.setField(this, 3, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.aptos.datastream.v1.StreamStatus} returns this - */ -proto.aptos.datastream.v1.StreamStatus.prototype.clearEndVersion = function() { - return jspb.Message.setField(this, 3, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aptos.datastream.v1.StreamStatus.prototype.hasEndVersion = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.aptos.datastream.v1.RawDatastreamRequest.prototype.toObject = function(opt_includeInstance) { - return proto.aptos.datastream.v1.RawDatastreamRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aptos.datastream.v1.RawDatastreamRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aptos.datastream.v1.RawDatastreamRequest.toObject = function(includeInstance, msg) { - var f, obj = { - startingVersion: jspb.Message.getFieldWithDefault(msg, 1, 0), - transactionsCount: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aptos.datastream.v1.RawDatastreamRequest} - */ -proto.aptos.datastream.v1.RawDatastreamRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aptos.datastream.v1.RawDatastreamRequest; - return proto.aptos.datastream.v1.RawDatastreamRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.aptos.datastream.v1.RawDatastreamRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aptos.datastream.v1.RawDatastreamRequest} - */ -proto.aptos.datastream.v1.RawDatastreamRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStartingVersion(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTransactionsCount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.aptos.datastream.v1.RawDatastreamRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aptos.datastream.v1.RawDatastreamRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aptos.datastream.v1.RawDatastreamRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aptos.datastream.v1.RawDatastreamRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeUint64( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint64( - 2, - f - ); - } -}; - - -/** - * optional uint64 starting_version = 1; - * @return {number} - */ -proto.aptos.datastream.v1.RawDatastreamRequest.prototype.getStartingVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.aptos.datastream.v1.RawDatastreamRequest} returns this - */ -proto.aptos.datastream.v1.RawDatastreamRequest.prototype.setStartingVersion = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.aptos.datastream.v1.RawDatastreamRequest} returns this - */ -proto.aptos.datastream.v1.RawDatastreamRequest.prototype.clearStartingVersion = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aptos.datastream.v1.RawDatastreamRequest.prototype.hasStartingVersion = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint64 transactions_count = 2; - * @return {number} - */ -proto.aptos.datastream.v1.RawDatastreamRequest.prototype.getTransactionsCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.aptos.datastream.v1.RawDatastreamRequest} returns this - */ -proto.aptos.datastream.v1.RawDatastreamRequest.prototype.setTransactionsCount = function(value) { - return jspb.Message.setField(this, 2, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.aptos.datastream.v1.RawDatastreamRequest} returns this - */ -proto.aptos.datastream.v1.RawDatastreamRequest.prototype.clearTransactionsCount = function() { - return jspb.Message.setField(this, 2, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aptos.datastream.v1.RawDatastreamRequest.prototype.hasTransactionsCount = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.aptos.datastream.v1.RawDatastreamResponse.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.aptos.datastream.v1.RawDatastreamResponse.ResponseCase = { - RESPONSE_NOT_SET: 0, - STATUS: 1, - DATA: 2 -}; - -/** - * @return {proto.aptos.datastream.v1.RawDatastreamResponse.ResponseCase} - */ -proto.aptos.datastream.v1.RawDatastreamResponse.prototype.getResponseCase = function() { - return /** @type {proto.aptos.datastream.v1.RawDatastreamResponse.ResponseCase} */(jspb.Message.computeOneofCase(this, proto.aptos.datastream.v1.RawDatastreamResponse.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.aptos.datastream.v1.RawDatastreamResponse.prototype.toObject = function(opt_includeInstance) { - return proto.aptos.datastream.v1.RawDatastreamResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aptos.datastream.v1.RawDatastreamResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aptos.datastream.v1.RawDatastreamResponse.toObject = function(includeInstance, msg) { - var f, obj = { - status: (f = msg.getStatus()) && proto.aptos.datastream.v1.StreamStatus.toObject(includeInstance, f), - data: (f = msg.getData()) && proto.aptos.datastream.v1.TransactionsOutput.toObject(includeInstance, f), - chainId: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aptos.datastream.v1.RawDatastreamResponse} - */ -proto.aptos.datastream.v1.RawDatastreamResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aptos.datastream.v1.RawDatastreamResponse; - return proto.aptos.datastream.v1.RawDatastreamResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.aptos.datastream.v1.RawDatastreamResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aptos.datastream.v1.RawDatastreamResponse} - */ -proto.aptos.datastream.v1.RawDatastreamResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aptos.datastream.v1.StreamStatus; - reader.readMessage(value,proto.aptos.datastream.v1.StreamStatus.deserializeBinaryFromReader); - msg.setStatus(value); - break; - case 2: - var value = new proto.aptos.datastream.v1.TransactionsOutput; - reader.readMessage(value,proto.aptos.datastream.v1.TransactionsOutput.deserializeBinaryFromReader); - msg.setData(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setChainId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.aptos.datastream.v1.RawDatastreamResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aptos.datastream.v1.RawDatastreamResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aptos.datastream.v1.RawDatastreamResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aptos.datastream.v1.RawDatastreamResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStatus(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.aptos.datastream.v1.StreamStatus.serializeBinaryToWriter - ); - } - f = message.getData(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.aptos.datastream.v1.TransactionsOutput.serializeBinaryToWriter - ); - } - f = message.getChainId(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } -}; - - -/** - * optional StreamStatus status = 1; - * @return {?proto.aptos.datastream.v1.StreamStatus} - */ -proto.aptos.datastream.v1.RawDatastreamResponse.prototype.getStatus = function() { - return /** @type{?proto.aptos.datastream.v1.StreamStatus} */ ( - jspb.Message.getWrapperField(this, proto.aptos.datastream.v1.StreamStatus, 1)); -}; - - -/** - * @param {?proto.aptos.datastream.v1.StreamStatus|undefined} value - * @return {!proto.aptos.datastream.v1.RawDatastreamResponse} returns this -*/ -proto.aptos.datastream.v1.RawDatastreamResponse.prototype.setStatus = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.aptos.datastream.v1.RawDatastreamResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.aptos.datastream.v1.RawDatastreamResponse} returns this - */ -proto.aptos.datastream.v1.RawDatastreamResponse.prototype.clearStatus = function() { - return this.setStatus(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aptos.datastream.v1.RawDatastreamResponse.prototype.hasStatus = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional TransactionsOutput data = 2; - * @return {?proto.aptos.datastream.v1.TransactionsOutput} - */ -proto.aptos.datastream.v1.RawDatastreamResponse.prototype.getData = function() { - return /** @type{?proto.aptos.datastream.v1.TransactionsOutput} */ ( - jspb.Message.getWrapperField(this, proto.aptos.datastream.v1.TransactionsOutput, 2)); -}; - - -/** - * @param {?proto.aptos.datastream.v1.TransactionsOutput|undefined} value - * @return {!proto.aptos.datastream.v1.RawDatastreamResponse} returns this -*/ -proto.aptos.datastream.v1.RawDatastreamResponse.prototype.setData = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.aptos.datastream.v1.RawDatastreamResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.aptos.datastream.v1.RawDatastreamResponse} returns this - */ -proto.aptos.datastream.v1.RawDatastreamResponse.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aptos.datastream.v1.RawDatastreamResponse.prototype.hasData = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint32 chain_id = 3; - * @return {number} - */ -proto.aptos.datastream.v1.RawDatastreamResponse.prototype.getChainId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.aptos.datastream.v1.RawDatastreamResponse} returns this - */ -proto.aptos.datastream.v1.RawDatastreamResponse.prototype.setChainId = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -goog.object.extend(exports, proto.aptos.datastream.v1); diff --git a/typescript/aptos/datastream/v1/datastream_pb_service.d.ts b/typescript/aptos/datastream/v1/datastream_pb_service.d.ts deleted file mode 100644 index f457a571f..000000000 --- a/typescript/aptos/datastream/v1/datastream_pb_service.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -// package: aptos.datastream.v1 -// file: aptos/datastream/v1/datastream.proto - -import * as aptos_datastream_v1_datastream_pb from "../../../aptos/datastream/v1/datastream_pb"; -import {grpc} from "@improbable-eng/grpc-web"; - -type IndexerStreamRawDatastream = { - readonly methodName: string; - readonly service: typeof IndexerStream; - readonly requestStream: false; - readonly responseStream: true; - readonly requestType: typeof aptos_datastream_v1_datastream_pb.RawDatastreamRequest; - readonly responseType: typeof aptos_datastream_v1_datastream_pb.RawDatastreamResponse; -}; - -export class IndexerStream { - static readonly serviceName: string; - static readonly RawDatastream: IndexerStreamRawDatastream; -} - -export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } -export type Status = { details: string, code: number; metadata: grpc.Metadata } - -interface UnaryResponse { - cancel(): void; -} -interface ResponseStream { - cancel(): void; - on(type: 'data', handler: (message: T) => void): ResponseStream; - on(type: 'end', handler: (status?: Status) => void): ResponseStream; - on(type: 'status', handler: (status: Status) => void): ResponseStream; -} -interface RequestStream { - write(message: T): RequestStream; - end(): void; - cancel(): void; - on(type: 'end', handler: (status?: Status) => void): RequestStream; - on(type: 'status', handler: (status: Status) => void): RequestStream; -} -interface BidirectionalStream { - write(message: ReqT): BidirectionalStream; - end(): void; - cancel(): void; - on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; - on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; - on(type: 'status', handler: (status: Status) => void): BidirectionalStream; -} - -export class IndexerStreamClient { - readonly serviceHost: string; - - constructor(serviceHost: string, options?: grpc.RpcOptions); - rawDatastream(requestMessage: aptos_datastream_v1_datastream_pb.RawDatastreamRequest, metadata?: grpc.Metadata): ResponseStream; -} - diff --git a/typescript/aptos/datastream/v1/datastream_pb_service.js b/typescript/aptos/datastream/v1/datastream_pb_service.js deleted file mode 100644 index 5fc5fd3af..000000000 --- a/typescript/aptos/datastream/v1/datastream_pb_service.js +++ /dev/null @@ -1,69 +0,0 @@ -// package: aptos.datastream.v1 -// file: aptos/datastream/v1/datastream.proto - -var aptos_datastream_v1_datastream_pb = require("../../../aptos/datastream/v1/datastream_pb"); -var grpc = require("@improbable-eng/grpc-web").grpc; - -var IndexerStream = (function () { - function IndexerStream() {} - IndexerStream.serviceName = "aptos.datastream.v1.IndexerStream"; - return IndexerStream; -}()); - -IndexerStream.RawDatastream = { - methodName: "RawDatastream", - service: IndexerStream, - requestStream: false, - responseStream: true, - requestType: aptos_datastream_v1_datastream_pb.RawDatastreamRequest, - responseType: aptos_datastream_v1_datastream_pb.RawDatastreamResponse -}; - -exports.IndexerStream = IndexerStream; - -function IndexerStreamClient(serviceHost, options) { - this.serviceHost = serviceHost; - this.options = options || {}; -} - -IndexerStreamClient.prototype.rawDatastream = function rawDatastream(requestMessage, metadata) { - var listeners = { - data: [], - end: [], - status: [] - }; - var client = grpc.invoke(IndexerStream.RawDatastream, { - request: requestMessage, - host: this.serviceHost, - metadata: metadata, - transport: this.options.transport, - debug: this.options.debug, - onMessage: function (responseMessage) { - listeners.data.forEach(function (handler) { - handler(responseMessage); - }); - }, - onEnd: function (status, statusMessage, trailers) { - listeners.status.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners.end.forEach(function (handler) { - handler({ code: status, details: statusMessage, metadata: trailers }); - }); - listeners = null; - } - }); - return { - on: function (type, handler) { - listeners[type].push(handler); - return this; - }, - cancel: function () { - listeners = null; - client.close(); - } - }; -}; - -exports.IndexerStreamClient = IndexerStreamClient; - diff --git a/typescript/aptos/indexer/v1/raw_data_grpc_pb.d.ts b/typescript/aptos/indexer/v1/raw_data_grpc_pb.d.ts new file mode 100644 index 000000000..2e36f443c --- /dev/null +++ b/typescript/aptos/indexer/v1/raw_data_grpc_pb.d.ts @@ -0,0 +1,40 @@ +// package: aptos.indexer.v1 +// file: aptos/indexer/v1/raw_data.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import * as aptos_indexer_v1_raw_data_pb from "../../../aptos/indexer/v1/raw_data_pb"; +import * as aptos_transaction_testing1_v1_transaction_pb from "../../../aptos/transaction/testing1/v1/transaction_pb"; + +interface IRawDataService extends grpc.ServiceDefinition { + getTransactions: IRawDataService_IGetTransactions; +} + +interface IRawDataService_IGetTransactions extends grpc.MethodDefinition { + path: "/aptos.indexer.v1.RawData/GetTransactions"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const RawDataService: IRawDataService; + +export interface IRawDataServer extends grpc.UntypedServiceImplementation { + getTransactions: grpc.handleServerStreamingCall; +} + +export interface IRawDataClient { + getTransactions(request: aptos_indexer_v1_raw_data_pb.GetTransactionsRequest, options?: Partial): grpc.ClientReadableStream; + getTransactions(request: aptos_indexer_v1_raw_data_pb.GetTransactionsRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; +} + +export class RawDataClient extends grpc.Client implements IRawDataClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public getTransactions(request: aptos_indexer_v1_raw_data_pb.GetTransactionsRequest, options?: Partial): grpc.ClientReadableStream; + public getTransactions(request: aptos_indexer_v1_raw_data_pb.GetTransactionsRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; +} diff --git a/typescript/aptos/indexer/v1/raw_data_grpc_pb.js b/typescript/aptos/indexer/v1/raw_data_grpc_pb.js new file mode 100644 index 000000000..e644e4770 --- /dev/null +++ b/typescript/aptos/indexer/v1/raw_data_grpc_pb.js @@ -0,0 +1,50 @@ +// GENERATED CODE -- DO NOT EDIT! + +// Original file comments: +// Copyright © Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 +// +'use strict'; +var grpc = require('@grpc/grpc-js'); +var aptos_indexer_v1_raw_data_pb = require('../../../aptos/indexer/v1/raw_data_pb.js'); +var aptos_transaction_testing1_v1_transaction_pb = require('../../../aptos/transaction/testing1/v1/transaction_pb.js'); + +function serialize_aptos_indexer_v1_GetTransactionsRequest(arg) { + if (!(arg instanceof aptos_indexer_v1_raw_data_pb.GetTransactionsRequest)) { + throw new Error('Expected argument of type aptos.indexer.v1.GetTransactionsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_aptos_indexer_v1_GetTransactionsRequest(buffer_arg) { + return aptos_indexer_v1_raw_data_pb.GetTransactionsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_aptos_indexer_v1_TransactionsResponse(arg) { + if (!(arg instanceof aptos_indexer_v1_raw_data_pb.TransactionsResponse)) { + throw new Error('Expected argument of type aptos.indexer.v1.TransactionsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_aptos_indexer_v1_TransactionsResponse(buffer_arg) { + return aptos_indexer_v1_raw_data_pb.TransactionsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var RawDataService = exports.RawDataService = { + // Get transactions batch without any filtering from starting version and end if transaction count is present. +getTransactions: { + path: '/aptos.indexer.v1.RawData/GetTransactions', + requestStream: false, + responseStream: true, + requestType: aptos_indexer_v1_raw_data_pb.GetTransactionsRequest, + responseType: aptos_indexer_v1_raw_data_pb.TransactionsResponse, + requestSerialize: serialize_aptos_indexer_v1_GetTransactionsRequest, + requestDeserialize: deserialize_aptos_indexer_v1_GetTransactionsRequest, + responseSerialize: serialize_aptos_indexer_v1_TransactionsResponse, + responseDeserialize: deserialize_aptos_indexer_v1_TransactionsResponse, + }, +}; + +exports.RawDataClient = grpc.makeGenericClientConstructor(RawDataService); diff --git a/typescript/aptos/indexer/v1/raw_data_pb.d.ts b/typescript/aptos/indexer/v1/raw_data_pb.d.ts new file mode 100644 index 000000000..435cc4bc1 --- /dev/null +++ b/typescript/aptos/indexer/v1/raw_data_pb.d.ts @@ -0,0 +1,65 @@ +// package: aptos.indexer.v1 +// file: aptos/indexer/v1/raw_data.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as aptos_transaction_testing1_v1_transaction_pb from "../../../aptos/transaction/testing1/v1/transaction_pb"; + +export class GetTransactionsRequest extends jspb.Message { + + hasStartingVersion(): boolean; + clearStartingVersion(): void; + getStartingVersion(): number | undefined; + setStartingVersion(value: number): GetTransactionsRequest; + + hasTransactionsCount(): boolean; + clearTransactionsCount(): void; + getTransactionsCount(): number | undefined; + setTransactionsCount(value: number): GetTransactionsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTransactionsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetTransactionsRequest): GetTransactionsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTransactionsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTransactionsRequest; + static deserializeBinaryFromReader(message: GetTransactionsRequest, reader: jspb.BinaryReader): GetTransactionsRequest; +} + +export namespace GetTransactionsRequest { + export type AsObject = { + startingVersion?: number, + transactionsCount?: number, + } +} + +export class TransactionsResponse extends jspb.Message { + clearTransactionsList(): void; + getTransactionsList(): Array; + setTransactionsList(value: Array): TransactionsResponse; + addTransactions(value?: aptos_transaction_testing1_v1_transaction_pb.Transaction, index?: number): aptos_transaction_testing1_v1_transaction_pb.Transaction; + + hasChainId(): boolean; + clearChainId(): void; + getChainId(): number | undefined; + setChainId(value: number): TransactionsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransactionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: TransactionsResponse): TransactionsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TransactionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransactionsResponse; + static deserializeBinaryFromReader(message: TransactionsResponse, reader: jspb.BinaryReader): TransactionsResponse; +} + +export namespace TransactionsResponse { + export type AsObject = { + transactionsList: Array, + chainId?: number, + } +} diff --git a/typescript/aptos/indexer/v1/raw_data_pb.js b/typescript/aptos/indexer/v1/raw_data_pb.js new file mode 100644 index 000000000..697503083 --- /dev/null +++ b/typescript/aptos/indexer/v1/raw_data_pb.js @@ -0,0 +1,474 @@ +// source: aptos/indexer/v1/raw_data.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var aptos_transaction_testing1_v1_transaction_pb = require('../../../aptos/transaction/testing1/v1/transaction_pb.js'); +goog.object.extend(proto, aptos_transaction_testing1_v1_transaction_pb); +goog.exportSymbol('proto.aptos.indexer.v1.GetTransactionsRequest', null, global); +goog.exportSymbol('proto.aptos.indexer.v1.TransactionsResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.aptos.indexer.v1.GetTransactionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aptos.indexer.v1.GetTransactionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aptos.indexer.v1.GetTransactionsRequest.displayName = 'proto.aptos.indexer.v1.GetTransactionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.aptos.indexer.v1.TransactionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aptos.indexer.v1.TransactionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.aptos.indexer.v1.TransactionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aptos.indexer.v1.TransactionsResponse.displayName = 'proto.aptos.indexer.v1.TransactionsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aptos.indexer.v1.GetTransactionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.aptos.indexer.v1.GetTransactionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aptos.indexer.v1.GetTransactionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aptos.indexer.v1.GetTransactionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + startingVersion: jspb.Message.getFieldWithDefault(msg, 1, 0), + transactionsCount: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aptos.indexer.v1.GetTransactionsRequest} + */ +proto.aptos.indexer.v1.GetTransactionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aptos.indexer.v1.GetTransactionsRequest; + return proto.aptos.indexer.v1.GetTransactionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aptos.indexer.v1.GetTransactionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aptos.indexer.v1.GetTransactionsRequest} + */ +proto.aptos.indexer.v1.GetTransactionsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStartingVersion(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTransactionsCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aptos.indexer.v1.GetTransactionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aptos.indexer.v1.GetTransactionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aptos.indexer.v1.GetTransactionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aptos.indexer.v1.GetTransactionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 starting_version = 1; + * @return {number} + */ +proto.aptos.indexer.v1.GetTransactionsRequest.prototype.getStartingVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aptos.indexer.v1.GetTransactionsRequest} returns this + */ +proto.aptos.indexer.v1.GetTransactionsRequest.prototype.setStartingVersion = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.aptos.indexer.v1.GetTransactionsRequest} returns this + */ +proto.aptos.indexer.v1.GetTransactionsRequest.prototype.clearStartingVersion = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aptos.indexer.v1.GetTransactionsRequest.prototype.hasStartingVersion = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 transactions_count = 2; + * @return {number} + */ +proto.aptos.indexer.v1.GetTransactionsRequest.prototype.getTransactionsCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aptos.indexer.v1.GetTransactionsRequest} returns this + */ +proto.aptos.indexer.v1.GetTransactionsRequest.prototype.setTransactionsCount = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.aptos.indexer.v1.GetTransactionsRequest} returns this + */ +proto.aptos.indexer.v1.GetTransactionsRequest.prototype.clearTransactionsCount = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aptos.indexer.v1.GetTransactionsRequest.prototype.hasTransactionsCount = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.aptos.indexer.v1.TransactionsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aptos.indexer.v1.TransactionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.aptos.indexer.v1.TransactionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aptos.indexer.v1.TransactionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aptos.indexer.v1.TransactionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), + aptos_transaction_testing1_v1_transaction_pb.Transaction.toObject, includeInstance), + chainId: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aptos.indexer.v1.TransactionsResponse} + */ +proto.aptos.indexer.v1.TransactionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aptos.indexer.v1.TransactionsResponse; + return proto.aptos.indexer.v1.TransactionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aptos.indexer.v1.TransactionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aptos.indexer.v1.TransactionsResponse} + */ +proto.aptos.indexer.v1.TransactionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new aptos_transaction_testing1_v1_transaction_pb.Transaction; + reader.readMessage(value,aptos_transaction_testing1_v1_transaction_pb.Transaction.deserializeBinaryFromReader); + msg.addTransactions(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setChainId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aptos.indexer.v1.TransactionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aptos.indexer.v1.TransactionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aptos.indexer.v1.TransactionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aptos.indexer.v1.TransactionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransactionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + aptos_transaction_testing1_v1_transaction_pb.Transaction.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * repeated aptos.transaction.testing1.v1.Transaction transactions = 1; + * @return {!Array} + */ +proto.aptos.indexer.v1.TransactionsResponse.prototype.getTransactionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, aptos_transaction_testing1_v1_transaction_pb.Transaction, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.aptos.indexer.v1.TransactionsResponse} returns this +*/ +proto.aptos.indexer.v1.TransactionsResponse.prototype.setTransactionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.aptos.transaction.testing1.v1.Transaction=} opt_value + * @param {number=} opt_index + * @return {!proto.aptos.transaction.testing1.v1.Transaction} + */ +proto.aptos.indexer.v1.TransactionsResponse.prototype.addTransactions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aptos.transaction.testing1.v1.Transaction, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.aptos.indexer.v1.TransactionsResponse} returns this + */ +proto.aptos.indexer.v1.TransactionsResponse.prototype.clearTransactionsList = function() { + return this.setTransactionsList([]); +}; + + +/** + * optional uint64 chain_id = 2; + * @return {number} + */ +proto.aptos.indexer.v1.TransactionsResponse.prototype.getChainId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aptos.indexer.v1.TransactionsResponse} returns this + */ +proto.aptos.indexer.v1.TransactionsResponse.prototype.setChainId = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.aptos.indexer.v1.TransactionsResponse} returns this + */ +proto.aptos.indexer.v1.TransactionsResponse.prototype.clearChainId = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aptos.indexer.v1.TransactionsResponse.prototype.hasChainId = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.aptos.indexer.v1); diff --git a/typescript/aptos/transaction/testing1/v1/transaction_grpc_pb.js b/typescript/aptos/transaction/testing1/v1/transaction_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/typescript/aptos/transaction/testing1/v1/transaction_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/typescript/aptos/transaction/testing1/v1/transaction_pb.d.ts b/typescript/aptos/transaction/testing1/v1/transaction_pb.d.ts index 772eb70ef..6cf0b03c5 100644 --- a/typescript/aptos/transaction/testing1/v1/transaction_pb.d.ts +++ b/typescript/aptos/transaction/testing1/v1/transaction_pb.d.ts @@ -1,1802 +1,1747 @@ // package: aptos.transaction.testing1.v1 // file: aptos/transaction/testing1/v1/transaction.proto +/* tslint:disable */ +/* eslint-disable */ + import * as jspb from "google-protobuf"; import * as aptos_util_timestamp_timestamp_pb from "../../../../aptos/util/timestamp/timestamp_pb"; -export class Block extends jspb.Message { - hasTimestamp(): boolean; - clearTimestamp(): void; - getTimestamp(): aptos_util_timestamp_timestamp_pb.Timestamp | undefined; - setTimestamp(value?: aptos_util_timestamp_timestamp_pb.Timestamp): void; +export class Block extends jspb.Message { + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): aptos_util_timestamp_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: aptos_util_timestamp_timestamp_pb.Timestamp): Block; + getHeight(): number; + setHeight(value: number): Block; + clearTransactionsList(): void; + getTransactionsList(): Array; + setTransactionsList(value: Array): Block; + addTransactions(value?: Transaction, index?: number): Transaction; + getChainId(): number; + setChainId(value: number): Block; - getHeight(): number; - setHeight(value: number): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Block.AsObject; + static toObject(includeInstance: boolean, msg: Block): Block.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Block, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Block; + static deserializeBinaryFromReader(message: Block, reader: jspb.BinaryReader): Block; +} - clearTransactionsList(): void; - getTransactionsList(): Array; - setTransactionsList(value: Array): void; - addTransactions(value?: Transaction, index?: number): Transaction; +export namespace Block { + export type AsObject = { + timestamp?: aptos_util_timestamp_timestamp_pb.Timestamp.AsObject, + height: number, + transactionsList: Array, + chainId: number, + } +} - getChainId(): number; - setChainId(value: number): void; +export class Transaction extends jspb.Message { + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): aptos_util_timestamp_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: aptos_util_timestamp_timestamp_pb.Timestamp): Transaction; + getVersion(): number; + setVersion(value: number): Transaction; + + hasInfo(): boolean; + clearInfo(): void; + getInfo(): TransactionInfo | undefined; + setInfo(value?: TransactionInfo): Transaction; + getEpoch(): number; + setEpoch(value: number): Transaction; + getBlockHeight(): number; + setBlockHeight(value: number): Transaction; + getType(): Transaction.TransactionType; + setType(value: Transaction.TransactionType): Transaction; + + hasBlockMetadata(): boolean; + clearBlockMetadata(): void; + getBlockMetadata(): BlockMetadataTransaction | undefined; + setBlockMetadata(value?: BlockMetadataTransaction): Transaction; + + hasGenesis(): boolean; + clearGenesis(): void; + getGenesis(): GenesisTransaction | undefined; + setGenesis(value?: GenesisTransaction): Transaction; + + hasStateCheckpoint(): boolean; + clearStateCheckpoint(): void; + getStateCheckpoint(): StateCheckpointTransaction | undefined; + setStateCheckpoint(value?: StateCheckpointTransaction): Transaction; + + hasUser(): boolean; + clearUser(): void; + getUser(): UserTransaction | undefined; + setUser(value?: UserTransaction): Transaction; + + getTxnDataCase(): Transaction.TxnDataCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Block.AsObject; - static toObject(includeInstance: boolean, msg: Block): Block.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Block, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Block; - static deserializeBinaryFromReader(message: Block, reader: jspb.BinaryReader): Block; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Transaction.AsObject; + static toObject(includeInstance: boolean, msg: Transaction): Transaction.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Transaction, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Transaction; + static deserializeBinaryFromReader(message: Transaction, reader: jspb.BinaryReader): Transaction; } -export namespace Block { - export type AsObject = { - timestamp?: aptos_util_timestamp_timestamp_pb.Timestamp.AsObject, - height: number, - transactionsList: Array, - chainId: number, - } -} - -export class Transaction extends jspb.Message { - hasTimestamp(): boolean; - clearTimestamp(): void; - getTimestamp(): aptos_util_timestamp_timestamp_pb.Timestamp | undefined; - setTimestamp(value?: aptos_util_timestamp_timestamp_pb.Timestamp): void; - - getVersion(): number; - setVersion(value: number): void; - - hasInfo(): boolean; - clearInfo(): void; - getInfo(): TransactionInfo | undefined; - setInfo(value?: TransactionInfo): void; - - getEpoch(): number; - setEpoch(value: number): void; - - getBlockHeight(): number; - setBlockHeight(value: number): void; - - getType(): Transaction.TransactionTypeMap[keyof Transaction.TransactionTypeMap]; - setType(value: Transaction.TransactionTypeMap[keyof Transaction.TransactionTypeMap]): void; - - hasBlockMetadata(): boolean; - clearBlockMetadata(): void; - getBlockMetadata(): BlockMetadataTransaction | undefined; - setBlockMetadata(value?: BlockMetadataTransaction): void; - - hasGenesis(): boolean; - clearGenesis(): void; - getGenesis(): GenesisTransaction | undefined; - setGenesis(value?: GenesisTransaction): void; - - hasStateCheckpoint(): boolean; - clearStateCheckpoint(): void; - getStateCheckpoint(): StateCheckpointTransaction | undefined; - setStateCheckpoint(value?: StateCheckpointTransaction): void; - - hasUser(): boolean; - clearUser(): void; - getUser(): UserTransaction | undefined; - setUser(value?: UserTransaction): void; - - getTxnDataCase(): Transaction.TxnDataCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Transaction.AsObject; - static toObject(includeInstance: boolean, msg: Transaction): Transaction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Transaction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Transaction; - static deserializeBinaryFromReader(message: Transaction, reader: jspb.BinaryReader): Transaction; +export namespace Transaction { + export type AsObject = { + timestamp?: aptos_util_timestamp_timestamp_pb.Timestamp.AsObject, + version: number, + info?: TransactionInfo.AsObject, + epoch: number, + blockHeight: number, + type: Transaction.TransactionType, + blockMetadata?: BlockMetadataTransaction.AsObject, + genesis?: GenesisTransaction.AsObject, + stateCheckpoint?: StateCheckpointTransaction.AsObject, + user?: UserTransaction.AsObject, + } + + export enum TransactionType { + TRANSACTION_TYPE_UNSPECIFIED = 0, + TRANSACTION_TYPE_GENESIS = 1, + TRANSACTION_TYPE_BLOCK_METADATA = 2, + TRANSACTION_TYPE_STATE_CHECKPOINT = 3, + TRANSACTION_TYPE_USER = 4, + } + + + export enum TxnDataCase { + TXN_DATA_NOT_SET = 0, + BLOCK_METADATA = 7, + GENESIS = 8, + STATE_CHECKPOINT = 9, + USER = 10, + } + } -export namespace Transaction { - export type AsObject = { - timestamp?: aptos_util_timestamp_timestamp_pb.Timestamp.AsObject, - version: number, - info?: TransactionInfo.AsObject, - epoch: number, - blockHeight: number, - type: Transaction.TransactionTypeMap[keyof Transaction.TransactionTypeMap], - blockMetadata?: BlockMetadataTransaction.AsObject, - genesis?: GenesisTransaction.AsObject, - stateCheckpoint?: StateCheckpointTransaction.AsObject, - user?: UserTransaction.AsObject, - } - - export interface TransactionTypeMap { - TRANSACTION_TYPE_UNSPECIFIED: 0; - TRANSACTION_TYPE_GENESIS: 1; - TRANSACTION_TYPE_BLOCK_METADATA: 2; - TRANSACTION_TYPE_STATE_CHECKPOINT: 3; - TRANSACTION_TYPE_USER: 4; - } - - export const TransactionType: TransactionTypeMap; - - export enum TxnDataCase { - TXN_DATA_NOT_SET = 0, - BLOCK_METADATA = 7, - GENESIS = 8, - STATE_CHECKPOINT = 9, - USER = 10, - } -} - -export class BlockMetadataTransaction extends jspb.Message { - getId(): string; - setId(value: string): void; - - getRound(): number; - setRound(value: number): void; - - clearEventsList(): void; - getEventsList(): Array; - setEventsList(value: Array): void; - addEvents(value?: Event, index?: number): Event; - - getPreviousBlockVotesBitvec(): Uint8Array | string; - getPreviousBlockVotesBitvec_asU8(): Uint8Array; - getPreviousBlockVotesBitvec_asB64(): string; - setPreviousBlockVotesBitvec(value: Uint8Array | string): void; - - getProposer(): string; - setProposer(value: string): void; - - clearFailedProposerIndicesList(): void; - getFailedProposerIndicesList(): Array; - setFailedProposerIndicesList(value: Array): void; - addFailedProposerIndices(value: number, index?: number): number; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BlockMetadataTransaction.AsObject; - static toObject(includeInstance: boolean, msg: BlockMetadataTransaction): BlockMetadataTransaction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BlockMetadataTransaction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BlockMetadataTransaction; - static deserializeBinaryFromReader(message: BlockMetadataTransaction, reader: jspb.BinaryReader): BlockMetadataTransaction; +export class BlockMetadataTransaction extends jspb.Message { + getId(): string; + setId(value: string): BlockMetadataTransaction; + getRound(): number; + setRound(value: number): BlockMetadataTransaction; + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): BlockMetadataTransaction; + addEvents(value?: Event, index?: number): Event; + getPreviousBlockVotesBitvec(): Uint8Array | string; + getPreviousBlockVotesBitvec_asU8(): Uint8Array; + getPreviousBlockVotesBitvec_asB64(): string; + setPreviousBlockVotesBitvec(value: Uint8Array | string): BlockMetadataTransaction; + getProposer(): string; + setProposer(value: string): BlockMetadataTransaction; + clearFailedProposerIndicesList(): void; + getFailedProposerIndicesList(): Array; + setFailedProposerIndicesList(value: Array): BlockMetadataTransaction; + addFailedProposerIndices(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockMetadataTransaction.AsObject; + static toObject(includeInstance: boolean, msg: BlockMetadataTransaction): BlockMetadataTransaction.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockMetadataTransaction, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockMetadataTransaction; + static deserializeBinaryFromReader(message: BlockMetadataTransaction, reader: jspb.BinaryReader): BlockMetadataTransaction; } export namespace BlockMetadataTransaction { - export type AsObject = { - id: string, - round: number, - eventsList: Array, - previousBlockVotesBitvec: Uint8Array | string, - proposer: string, - failedProposerIndicesList: Array, - } -} - -export class GenesisTransaction extends jspb.Message { - hasPayload(): boolean; - clearPayload(): void; - getPayload(): WriteSet | undefined; - setPayload(value?: WriteSet): void; - - clearEventsList(): void; - getEventsList(): Array; - setEventsList(value: Array): void; - addEvents(value?: Event, index?: number): Event; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GenesisTransaction.AsObject; - static toObject(includeInstance: boolean, msg: GenesisTransaction): GenesisTransaction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GenesisTransaction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GenesisTransaction; - static deserializeBinaryFromReader(message: GenesisTransaction, reader: jspb.BinaryReader): GenesisTransaction; + export type AsObject = { + id: string, + round: number, + eventsList: Array, + previousBlockVotesBitvec: Uint8Array | string, + proposer: string, + failedProposerIndicesList: Array, + } +} + +export class GenesisTransaction extends jspb.Message { + + hasPayload(): boolean; + clearPayload(): void; + getPayload(): WriteSet | undefined; + setPayload(value?: WriteSet): GenesisTransaction; + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): GenesisTransaction; + addEvents(value?: Event, index?: number): Event; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenesisTransaction.AsObject; + static toObject(includeInstance: boolean, msg: GenesisTransaction): GenesisTransaction.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenesisTransaction, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenesisTransaction; + static deserializeBinaryFromReader(message: GenesisTransaction, reader: jspb.BinaryReader): GenesisTransaction; } export namespace GenesisTransaction { - export type AsObject = { - payload?: WriteSet.AsObject, - eventsList: Array, - } + export type AsObject = { + payload?: WriteSet.AsObject, + eventsList: Array, + } } -export class StateCheckpointTransaction extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StateCheckpointTransaction.AsObject; - static toObject(includeInstance: boolean, msg: StateCheckpointTransaction): StateCheckpointTransaction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StateCheckpointTransaction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StateCheckpointTransaction; - static deserializeBinaryFromReader(message: StateCheckpointTransaction, reader: jspb.BinaryReader): StateCheckpointTransaction; +export class StateCheckpointTransaction extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StateCheckpointTransaction.AsObject; + static toObject(includeInstance: boolean, msg: StateCheckpointTransaction): StateCheckpointTransaction.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StateCheckpointTransaction, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StateCheckpointTransaction; + static deserializeBinaryFromReader(message: StateCheckpointTransaction, reader: jspb.BinaryReader): StateCheckpointTransaction; } export namespace StateCheckpointTransaction { - export type AsObject = { - } + export type AsObject = { + } } -export class UserTransaction extends jspb.Message { - hasRequest(): boolean; - clearRequest(): void; - getRequest(): UserTransactionRequest | undefined; - setRequest(value?: UserTransactionRequest): void; +export class UserTransaction extends jspb.Message { - clearEventsList(): void; - getEventsList(): Array; - setEventsList(value: Array): void; - addEvents(value?: Event, index?: number): Event; + hasRequest(): boolean; + clearRequest(): void; + getRequest(): UserTransactionRequest | undefined; + setRequest(value?: UserTransactionRequest): UserTransaction; + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): UserTransaction; + addEvents(value?: Event, index?: number): Event; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UserTransaction.AsObject; - static toObject(includeInstance: boolean, msg: UserTransaction): UserTransaction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UserTransaction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UserTransaction; - static deserializeBinaryFromReader(message: UserTransaction, reader: jspb.BinaryReader): UserTransaction; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UserTransaction.AsObject; + static toObject(includeInstance: boolean, msg: UserTransaction): UserTransaction.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UserTransaction, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UserTransaction; + static deserializeBinaryFromReader(message: UserTransaction, reader: jspb.BinaryReader): UserTransaction; } export namespace UserTransaction { - export type AsObject = { - request?: UserTransactionRequest.AsObject, - eventsList: Array, - } + export type AsObject = { + request?: UserTransactionRequest.AsObject, + eventsList: Array, + } } -export class Event extends jspb.Message { - hasKey(): boolean; - clearKey(): void; - getKey(): EventKey | undefined; - setKey(value?: EventKey): void; - - getSequenceNumber(): number; - setSequenceNumber(value: number): void; - - hasType(): boolean; - clearType(): void; - getType(): MoveType | undefined; - setType(value?: MoveType): void; +export class Event extends jspb.Message { - getTypeStr(): string; - setTypeStr(value: string): void; + hasKey(): boolean; + clearKey(): void; + getKey(): EventKey | undefined; + setKey(value?: EventKey): Event; + getSequenceNumber(): number; + setSequenceNumber(value: number): Event; - getData(): string; - setData(value: string): void; + hasType(): boolean; + clearType(): void; + getType(): MoveType | undefined; + setType(value?: MoveType): Event; + getTypeStr(): string; + setTypeStr(value: string): Event; + getData(): string; + setData(value: string): Event; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Event.AsObject; - static toObject(includeInstance: boolean, msg: Event): Event.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Event, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Event; - static deserializeBinaryFromReader(message: Event, reader: jspb.BinaryReader): Event; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Event.AsObject; + static toObject(includeInstance: boolean, msg: Event): Event.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Event, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Event; + static deserializeBinaryFromReader(message: Event, reader: jspb.BinaryReader): Event; } export namespace Event { - export type AsObject = { - key?: EventKey.AsObject, - sequenceNumber: number, - type?: MoveType.AsObject, - typeStr: string, - data: string, - } -} - -export class TransactionInfo extends jspb.Message { - getHash(): Uint8Array | string; - getHash_asU8(): Uint8Array; - getHash_asB64(): string; - setHash(value: Uint8Array | string): void; - - getStateChangeHash(): Uint8Array | string; - getStateChangeHash_asU8(): Uint8Array; - getStateChangeHash_asB64(): string; - setStateChangeHash(value: Uint8Array | string): void; - - getEventRootHash(): Uint8Array | string; - getEventRootHash_asU8(): Uint8Array; - getEventRootHash_asB64(): string; - setEventRootHash(value: Uint8Array | string): void; - - hasStateCheckpointHash(): boolean; - clearStateCheckpointHash(): void; - getStateCheckpointHash(): Uint8Array | string; - getStateCheckpointHash_asU8(): Uint8Array; - getStateCheckpointHash_asB64(): string; - setStateCheckpointHash(value: Uint8Array | string): void; - - getGasUsed(): number; - setGasUsed(value: number): void; - - getSuccess(): boolean; - setSuccess(value: boolean): void; - - getVmStatus(): string; - setVmStatus(value: string): void; - - getAccumulatorRootHash(): Uint8Array | string; - getAccumulatorRootHash_asU8(): Uint8Array; - getAccumulatorRootHash_asB64(): string; - setAccumulatorRootHash(value: Uint8Array | string): void; - - clearChangesList(): void; - getChangesList(): Array; - setChangesList(value: Array): void; - addChanges(value?: WriteSetChange, index?: number): WriteSetChange; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TransactionInfo.AsObject; - static toObject(includeInstance: boolean, msg: TransactionInfo): TransactionInfo.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TransactionInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TransactionInfo; - static deserializeBinaryFromReader(message: TransactionInfo, reader: jspb.BinaryReader): TransactionInfo; + export type AsObject = { + key?: EventKey.AsObject, + sequenceNumber: number, + type?: MoveType.AsObject, + typeStr: string, + data: string, + } } -export namespace TransactionInfo { - export type AsObject = { - hash: Uint8Array | string, - stateChangeHash: Uint8Array | string, - eventRootHash: Uint8Array | string, - stateCheckpointHash: Uint8Array | string, - gasUsed: number, - success: boolean, - vmStatus: string, - accumulatorRootHash: Uint8Array | string, - changesList: Array, - } -} - -export class EventKey extends jspb.Message { - getCreationNumber(): number; - setCreationNumber(value: number): void; - - getAccountAddress(): string; - setAccountAddress(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EventKey.AsObject; - static toObject(includeInstance: boolean, msg: EventKey): EventKey.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EventKey, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EventKey; - static deserializeBinaryFromReader(message: EventKey, reader: jspb.BinaryReader): EventKey; +export class TransactionInfo extends jspb.Message { + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): TransactionInfo; + getStateChangeHash(): Uint8Array | string; + getStateChangeHash_asU8(): Uint8Array; + getStateChangeHash_asB64(): string; + setStateChangeHash(value: Uint8Array | string): TransactionInfo; + getEventRootHash(): Uint8Array | string; + getEventRootHash_asU8(): Uint8Array; + getEventRootHash_asB64(): string; + setEventRootHash(value: Uint8Array | string): TransactionInfo; + + hasStateCheckpointHash(): boolean; + clearStateCheckpointHash(): void; + getStateCheckpointHash(): Uint8Array | string; + getStateCheckpointHash_asU8(): Uint8Array; + getStateCheckpointHash_asB64(): string; + setStateCheckpointHash(value: Uint8Array | string): TransactionInfo; + getGasUsed(): number; + setGasUsed(value: number): TransactionInfo; + getSuccess(): boolean; + setSuccess(value: boolean): TransactionInfo; + getVmStatus(): string; + setVmStatus(value: string): TransactionInfo; + getAccumulatorRootHash(): Uint8Array | string; + getAccumulatorRootHash_asU8(): Uint8Array; + getAccumulatorRootHash_asB64(): string; + setAccumulatorRootHash(value: Uint8Array | string): TransactionInfo; + clearChangesList(): void; + getChangesList(): Array; + setChangesList(value: Array): TransactionInfo; + addChanges(value?: WriteSetChange, index?: number): WriteSetChange; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransactionInfo.AsObject; + static toObject(includeInstance: boolean, msg: TransactionInfo): TransactionInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TransactionInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransactionInfo; + static deserializeBinaryFromReader(message: TransactionInfo, reader: jspb.BinaryReader): TransactionInfo; } -export namespace EventKey { - export type AsObject = { - creationNumber: number, - accountAddress: string, - } +export namespace TransactionInfo { + export type AsObject = { + hash: Uint8Array | string, + stateChangeHash: Uint8Array | string, + eventRootHash: Uint8Array | string, + stateCheckpointHash: Uint8Array | string, + gasUsed: number, + success: boolean, + vmStatus: string, + accumulatorRootHash: Uint8Array | string, + changesList: Array, + } } -export class UserTransactionRequest extends jspb.Message { - getSender(): string; - setSender(value: string): void; +export class EventKey extends jspb.Message { + getCreationNumber(): number; + setCreationNumber(value: number): EventKey; + getAccountAddress(): string; + setAccountAddress(value: string): EventKey; - getSequenceNumber(): number; - setSequenceNumber(value: number): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EventKey.AsObject; + static toObject(includeInstance: boolean, msg: EventKey): EventKey.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EventKey, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EventKey; + static deserializeBinaryFromReader(message: EventKey, reader: jspb.BinaryReader): EventKey; +} - getMaxGasAmount(): number; - setMaxGasAmount(value: number): void; +export namespace EventKey { + export type AsObject = { + creationNumber: number, + accountAddress: string, + } +} - getGasUnitPrice(): number; - setGasUnitPrice(value: number): void; +export class UserTransactionRequest extends jspb.Message { + getSender(): string; + setSender(value: string): UserTransactionRequest; + getSequenceNumber(): number; + setSequenceNumber(value: number): UserTransactionRequest; + getMaxGasAmount(): number; + setMaxGasAmount(value: number): UserTransactionRequest; + getGasUnitPrice(): number; + setGasUnitPrice(value: number): UserTransactionRequest; - hasExpirationTimestampSecs(): boolean; - clearExpirationTimestampSecs(): void; - getExpirationTimestampSecs(): aptos_util_timestamp_timestamp_pb.Timestamp | undefined; - setExpirationTimestampSecs(value?: aptos_util_timestamp_timestamp_pb.Timestamp): void; + hasExpirationTimestampSecs(): boolean; + clearExpirationTimestampSecs(): void; + getExpirationTimestampSecs(): aptos_util_timestamp_timestamp_pb.Timestamp | undefined; + setExpirationTimestampSecs(value?: aptos_util_timestamp_timestamp_pb.Timestamp): UserTransactionRequest; - hasPayload(): boolean; - clearPayload(): void; - getPayload(): TransactionPayload | undefined; - setPayload(value?: TransactionPayload): void; + hasPayload(): boolean; + clearPayload(): void; + getPayload(): TransactionPayload | undefined; + setPayload(value?: TransactionPayload): UserTransactionRequest; - hasSignature(): boolean; - clearSignature(): void; - getSignature(): Signature | undefined; - setSignature(value?: Signature): void; + hasSignature(): boolean; + clearSignature(): void; + getSignature(): Signature | undefined; + setSignature(value?: Signature): UserTransactionRequest; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UserTransactionRequest.AsObject; - static toObject(includeInstance: boolean, msg: UserTransactionRequest): UserTransactionRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UserTransactionRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UserTransactionRequest; - static deserializeBinaryFromReader(message: UserTransactionRequest, reader: jspb.BinaryReader): UserTransactionRequest; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UserTransactionRequest.AsObject; + static toObject(includeInstance: boolean, msg: UserTransactionRequest): UserTransactionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UserTransactionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UserTransactionRequest; + static deserializeBinaryFromReader(message: UserTransactionRequest, reader: jspb.BinaryReader): UserTransactionRequest; } export namespace UserTransactionRequest { - export type AsObject = { - sender: string, - sequenceNumber: number, - maxGasAmount: number, - gasUnitPrice: number, - expirationTimestampSecs?: aptos_util_timestamp_timestamp_pb.Timestamp.AsObject, - payload?: TransactionPayload.AsObject, - signature?: Signature.AsObject, - } -} - -export class WriteSet extends jspb.Message { - getWriteSetType(): WriteSet.WriteSetTypeMap[keyof WriteSet.WriteSetTypeMap]; - setWriteSetType(value: WriteSet.WriteSetTypeMap[keyof WriteSet.WriteSetTypeMap]): void; - - hasScriptWriteSet(): boolean; - clearScriptWriteSet(): void; - getScriptWriteSet(): ScriptWriteSet | undefined; - setScriptWriteSet(value?: ScriptWriteSet): void; - - hasDirectWriteSet(): boolean; - clearDirectWriteSet(): void; - getDirectWriteSet(): DirectWriteSet | undefined; - setDirectWriteSet(value?: DirectWriteSet): void; - - getWriteSetCase(): WriteSet.WriteSetCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WriteSet.AsObject; - static toObject(includeInstance: boolean, msg: WriteSet): WriteSet.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WriteSet, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WriteSet; - static deserializeBinaryFromReader(message: WriteSet, reader: jspb.BinaryReader): WriteSet; + export type AsObject = { + sender: string, + sequenceNumber: number, + maxGasAmount: number, + gasUnitPrice: number, + expirationTimestampSecs?: aptos_util_timestamp_timestamp_pb.Timestamp.AsObject, + payload?: TransactionPayload.AsObject, + signature?: Signature.AsObject, + } } -export namespace WriteSet { - export type AsObject = { - writeSetType: WriteSet.WriteSetTypeMap[keyof WriteSet.WriteSetTypeMap], - scriptWriteSet?: ScriptWriteSet.AsObject, - directWriteSet?: DirectWriteSet.AsObject, - } - - export interface WriteSetTypeMap { - WRITE_SET_TYPE_UNSPECIFIED: 0; - WRITE_SET_TYPE_SCRIPT_WRITE_SET: 1; - WRITE_SET_TYPE_DIRECT_WRITE_SET: 2; - } - - export const WriteSetType: WriteSetTypeMap; - - export enum WriteSetCase { - WRITE_SET_NOT_SET = 0, - SCRIPT_WRITE_SET = 2, - DIRECT_WRITE_SET = 3, - } -} - -export class ScriptWriteSet extends jspb.Message { - getExecuteAs(): string; - setExecuteAs(value: string): void; - - hasScript(): boolean; - clearScript(): void; - getScript(): ScriptPayload | undefined; - setScript(value?: ScriptPayload): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ScriptWriteSet.AsObject; - static toObject(includeInstance: boolean, msg: ScriptWriteSet): ScriptWriteSet.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ScriptWriteSet, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ScriptWriteSet; - static deserializeBinaryFromReader(message: ScriptWriteSet, reader: jspb.BinaryReader): ScriptWriteSet; +export class WriteSet extends jspb.Message { + getWriteSetType(): WriteSet.WriteSetType; + setWriteSetType(value: WriteSet.WriteSetType): WriteSet; + + hasScriptWriteSet(): boolean; + clearScriptWriteSet(): void; + getScriptWriteSet(): ScriptWriteSet | undefined; + setScriptWriteSet(value?: ScriptWriteSet): WriteSet; + + hasDirectWriteSet(): boolean; + clearDirectWriteSet(): void; + getDirectWriteSet(): DirectWriteSet | undefined; + setDirectWriteSet(value?: DirectWriteSet): WriteSet; + + getWriteSetCase(): WriteSet.WriteSetCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WriteSet.AsObject; + static toObject(includeInstance: boolean, msg: WriteSet): WriteSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: WriteSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WriteSet; + static deserializeBinaryFromReader(message: WriteSet, reader: jspb.BinaryReader): WriteSet; } -export namespace ScriptWriteSet { - export type AsObject = { - executeAs: string, - script?: ScriptPayload.AsObject, - } +export namespace WriteSet { + export type AsObject = { + writeSetType: WriteSet.WriteSetType, + scriptWriteSet?: ScriptWriteSet.AsObject, + directWriteSet?: DirectWriteSet.AsObject, + } + + export enum WriteSetType { + WRITE_SET_TYPE_UNSPECIFIED = 0, + WRITE_SET_TYPE_SCRIPT_WRITE_SET = 1, + WRITE_SET_TYPE_DIRECT_WRITE_SET = 2, + } + + + export enum WriteSetCase { + WRITE_SET_NOT_SET = 0, + SCRIPT_WRITE_SET = 2, + DIRECT_WRITE_SET = 3, + } + } -export class DirectWriteSet extends jspb.Message { - clearWriteSetChangeList(): void; - getWriteSetChangeList(): Array; - setWriteSetChangeList(value: Array): void; - addWriteSetChange(value?: WriteSetChange, index?: number): WriteSetChange; +export class ScriptWriteSet extends jspb.Message { + getExecuteAs(): string; + setExecuteAs(value: string): ScriptWriteSet; - clearEventsList(): void; - getEventsList(): Array; - setEventsList(value: Array): void; - addEvents(value?: Event, index?: number): Event; + hasScript(): boolean; + clearScript(): void; + getScript(): ScriptPayload | undefined; + setScript(value?: ScriptPayload): ScriptWriteSet; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DirectWriteSet.AsObject; - static toObject(includeInstance: boolean, msg: DirectWriteSet): DirectWriteSet.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DirectWriteSet, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DirectWriteSet; - static deserializeBinaryFromReader(message: DirectWriteSet, reader: jspb.BinaryReader): DirectWriteSet; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ScriptWriteSet.AsObject; + static toObject(includeInstance: boolean, msg: ScriptWriteSet): ScriptWriteSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ScriptWriteSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ScriptWriteSet; + static deserializeBinaryFromReader(message: ScriptWriteSet, reader: jspb.BinaryReader): ScriptWriteSet; } -export namespace DirectWriteSet { - export type AsObject = { - writeSetChangeList: Array, - eventsList: Array, - } -} - -export class WriteSetChange extends jspb.Message { - getType(): WriteSetChange.TypeMap[keyof WriteSetChange.TypeMap]; - setType(value: WriteSetChange.TypeMap[keyof WriteSetChange.TypeMap]): void; - - hasDeleteModule(): boolean; - clearDeleteModule(): void; - getDeleteModule(): DeleteModule | undefined; - setDeleteModule(value?: DeleteModule): void; - - hasDeleteResource(): boolean; - clearDeleteResource(): void; - getDeleteResource(): DeleteResource | undefined; - setDeleteResource(value?: DeleteResource): void; - - hasDeleteTableItem(): boolean; - clearDeleteTableItem(): void; - getDeleteTableItem(): DeleteTableItem | undefined; - setDeleteTableItem(value?: DeleteTableItem): void; - - hasWriteModule(): boolean; - clearWriteModule(): void; - getWriteModule(): WriteModule | undefined; - setWriteModule(value?: WriteModule): void; - - hasWriteResource(): boolean; - clearWriteResource(): void; - getWriteResource(): WriteResource | undefined; - setWriteResource(value?: WriteResource): void; - - hasWriteTableItem(): boolean; - clearWriteTableItem(): void; - getWriteTableItem(): WriteTableItem | undefined; - setWriteTableItem(value?: WriteTableItem): void; - - getChangeCase(): WriteSetChange.ChangeCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WriteSetChange.AsObject; - static toObject(includeInstance: boolean, msg: WriteSetChange): WriteSetChange.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WriteSetChange, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WriteSetChange; - static deserializeBinaryFromReader(message: WriteSetChange, reader: jspb.BinaryReader): WriteSetChange; +export namespace ScriptWriteSet { + export type AsObject = { + executeAs: string, + script?: ScriptPayload.AsObject, + } } -export namespace WriteSetChange { - export type AsObject = { - type: WriteSetChange.TypeMap[keyof WriteSetChange.TypeMap], - deleteModule?: DeleteModule.AsObject, - deleteResource?: DeleteResource.AsObject, - deleteTableItem?: DeleteTableItem.AsObject, - writeModule?: WriteModule.AsObject, - writeResource?: WriteResource.AsObject, - writeTableItem?: WriteTableItem.AsObject, - } - - export interface TypeMap { - TYPE_UNSPECIFIED: 0; - TYPE_DELETE_MODULE: 1; - TYPE_DELETE_RESOURCE: 2; - TYPE_DELETE_TABLE_ITEM: 3; - TYPE_WRITE_MODULE: 4; - TYPE_WRITE_RESOURCE: 5; - TYPE_WRITE_TABLE_ITEM: 6; - } - - export const Type: TypeMap; - - export enum ChangeCase { - CHANGE_NOT_SET = 0, - DELETE_MODULE = 2, - DELETE_RESOURCE = 3, - DELETE_TABLE_ITEM = 4, - WRITE_MODULE = 5, - WRITE_RESOURCE = 6, - WRITE_TABLE_ITEM = 7, - } -} - -export class DeleteModule extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; - - getStateKeyHash(): Uint8Array | string; - getStateKeyHash_asU8(): Uint8Array; - getStateKeyHash_asB64(): string; - setStateKeyHash(value: Uint8Array | string): void; - - hasModule(): boolean; - clearModule(): void; - getModule(): MoveModuleId | undefined; - setModule(value?: MoveModuleId): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteModule.AsObject; - static toObject(includeInstance: boolean, msg: DeleteModule): DeleteModule.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteModule, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteModule; - static deserializeBinaryFromReader(message: DeleteModule, reader: jspb.BinaryReader): DeleteModule; +export class DirectWriteSet extends jspb.Message { + clearWriteSetChangeList(): void; + getWriteSetChangeList(): Array; + setWriteSetChangeList(value: Array): DirectWriteSet; + addWriteSetChange(value?: WriteSetChange, index?: number): WriteSetChange; + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): DirectWriteSet; + addEvents(value?: Event, index?: number): Event; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DirectWriteSet.AsObject; + static toObject(includeInstance: boolean, msg: DirectWriteSet): DirectWriteSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DirectWriteSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DirectWriteSet; + static deserializeBinaryFromReader(message: DirectWriteSet, reader: jspb.BinaryReader): DirectWriteSet; } -export namespace DeleteModule { - export type AsObject = { - address: string, - stateKeyHash: Uint8Array | string, - module?: MoveModuleId.AsObject, - } +export namespace DirectWriteSet { + export type AsObject = { + writeSetChangeList: Array, + eventsList: Array, + } } -export class DeleteResource extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; +export class WriteSetChange extends jspb.Message { + getType(): WriteSetChange.Type; + setType(value: WriteSetChange.Type): WriteSetChange; - getStateKeyHash(): Uint8Array | string; - getStateKeyHash_asU8(): Uint8Array; - getStateKeyHash_asB64(): string; - setStateKeyHash(value: Uint8Array | string): void; + hasDeleteModule(): boolean; + clearDeleteModule(): void; + getDeleteModule(): DeleteModule | undefined; + setDeleteModule(value?: DeleteModule): WriteSetChange; - hasType(): boolean; - clearType(): void; - getType(): MoveStructTag | undefined; - setType(value?: MoveStructTag): void; + hasDeleteResource(): boolean; + clearDeleteResource(): void; + getDeleteResource(): DeleteResource | undefined; + setDeleteResource(value?: DeleteResource): WriteSetChange; - getTypeStr(): string; - setTypeStr(value: string): void; + hasDeleteTableItem(): boolean; + clearDeleteTableItem(): void; + getDeleteTableItem(): DeleteTableItem | undefined; + setDeleteTableItem(value?: DeleteTableItem): WriteSetChange; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteResource.AsObject; - static toObject(includeInstance: boolean, msg: DeleteResource): DeleteResource.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteResource, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteResource; - static deserializeBinaryFromReader(message: DeleteResource, reader: jspb.BinaryReader): DeleteResource; -} + hasWriteModule(): boolean; + clearWriteModule(): void; + getWriteModule(): WriteModule | undefined; + setWriteModule(value?: WriteModule): WriteSetChange; -export namespace DeleteResource { - export type AsObject = { - address: string, - stateKeyHash: Uint8Array | string, - type?: MoveStructTag.AsObject, - typeStr: string, - } + hasWriteResource(): boolean; + clearWriteResource(): void; + getWriteResource(): WriteResource | undefined; + setWriteResource(value?: WriteResource): WriteSetChange; + + hasWriteTableItem(): boolean; + clearWriteTableItem(): void; + getWriteTableItem(): WriteTableItem | undefined; + setWriteTableItem(value?: WriteTableItem): WriteSetChange; + + getChangeCase(): WriteSetChange.ChangeCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WriteSetChange.AsObject; + static toObject(includeInstance: boolean, msg: WriteSetChange): WriteSetChange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: WriteSetChange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WriteSetChange; + static deserializeBinaryFromReader(message: WriteSetChange, reader: jspb.BinaryReader): WriteSetChange; } -export class DeleteTableItem extends jspb.Message { - getStateKeyHash(): Uint8Array | string; - getStateKeyHash_asU8(): Uint8Array; - getStateKeyHash_asB64(): string; - setStateKeyHash(value: Uint8Array | string): void; +export namespace WriteSetChange { + export type AsObject = { + type: WriteSetChange.Type, + deleteModule?: DeleteModule.AsObject, + deleteResource?: DeleteResource.AsObject, + deleteTableItem?: DeleteTableItem.AsObject, + writeModule?: WriteModule.AsObject, + writeResource?: WriteResource.AsObject, + writeTableItem?: WriteTableItem.AsObject, + } - getHandle(): string; - setHandle(value: string): void; + export enum Type { + TYPE_UNSPECIFIED = 0, + TYPE_DELETE_MODULE = 1, + TYPE_DELETE_RESOURCE = 2, + TYPE_DELETE_TABLE_ITEM = 3, + TYPE_WRITE_MODULE = 4, + TYPE_WRITE_RESOURCE = 5, + TYPE_WRITE_TABLE_ITEM = 6, + } - getKey(): string; - setKey(value: string): void; - hasData(): boolean; - clearData(): void; - getData(): DeleteTableData | undefined; - setData(value?: DeleteTableData): void; + export enum ChangeCase { + CHANGE_NOT_SET = 0, + DELETE_MODULE = 2, + DELETE_RESOURCE = 3, + DELETE_TABLE_ITEM = 4, + WRITE_MODULE = 5, + WRITE_RESOURCE = 6, + WRITE_TABLE_ITEM = 7, + } - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteTableItem.AsObject; - static toObject(includeInstance: boolean, msg: DeleteTableItem): DeleteTableItem.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteTableItem, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteTableItem; - static deserializeBinaryFromReader(message: DeleteTableItem, reader: jspb.BinaryReader): DeleteTableItem; } -export namespace DeleteTableItem { - export type AsObject = { - stateKeyHash: Uint8Array | string, - handle: string, - key: string, - data?: DeleteTableData.AsObject, - } +export class DeleteModule extends jspb.Message { + getAddress(): string; + setAddress(value: string): DeleteModule; + getStateKeyHash(): Uint8Array | string; + getStateKeyHash_asU8(): Uint8Array; + getStateKeyHash_asB64(): string; + setStateKeyHash(value: Uint8Array | string): DeleteModule; + + hasModule(): boolean; + clearModule(): void; + getModule(): MoveModuleId | undefined; + setModule(value?: MoveModuleId): DeleteModule; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteModule.AsObject; + static toObject(includeInstance: boolean, msg: DeleteModule): DeleteModule.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteModule, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteModule; + static deserializeBinaryFromReader(message: DeleteModule, reader: jspb.BinaryReader): DeleteModule; } -export class DeleteTableData extends jspb.Message { - getKey(): string; - setKey(value: string): void; +export namespace DeleteModule { + export type AsObject = { + address: string, + stateKeyHash: Uint8Array | string, + module?: MoveModuleId.AsObject, + } +} + +export class DeleteResource extends jspb.Message { + getAddress(): string; + setAddress(value: string): DeleteResource; + getStateKeyHash(): Uint8Array | string; + getStateKeyHash_asU8(): Uint8Array; + getStateKeyHash_asB64(): string; + setStateKeyHash(value: Uint8Array | string): DeleteResource; - getKeyType(): string; - setKeyType(value: string): void; + hasType(): boolean; + clearType(): void; + getType(): MoveStructTag | undefined; + setType(value?: MoveStructTag): DeleteResource; + getTypeStr(): string; + setTypeStr(value: string): DeleteResource; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteTableData.AsObject; - static toObject(includeInstance: boolean, msg: DeleteTableData): DeleteTableData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteTableData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteTableData; - static deserializeBinaryFromReader(message: DeleteTableData, reader: jspb.BinaryReader): DeleteTableData; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteResource.AsObject; + static toObject(includeInstance: boolean, msg: DeleteResource): DeleteResource.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteResource, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteResource; + static deserializeBinaryFromReader(message: DeleteResource, reader: jspb.BinaryReader): DeleteResource; } -export namespace DeleteTableData { - export type AsObject = { - key: string, - keyType: string, - } +export namespace DeleteResource { + export type AsObject = { + address: string, + stateKeyHash: Uint8Array | string, + type?: MoveStructTag.AsObject, + typeStr: string, + } } -export class WriteModule extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; +export class DeleteTableItem extends jspb.Message { + getStateKeyHash(): Uint8Array | string; + getStateKeyHash_asU8(): Uint8Array; + getStateKeyHash_asB64(): string; + setStateKeyHash(value: Uint8Array | string): DeleteTableItem; + getHandle(): string; + setHandle(value: string): DeleteTableItem; + getKey(): string; + setKey(value: string): DeleteTableItem; - getStateKeyHash(): Uint8Array | string; - getStateKeyHash_asU8(): Uint8Array; - getStateKeyHash_asB64(): string; - setStateKeyHash(value: Uint8Array | string): void; + hasData(): boolean; + clearData(): void; + getData(): DeleteTableData | undefined; + setData(value?: DeleteTableData): DeleteTableItem; - hasData(): boolean; - clearData(): void; - getData(): MoveModuleBytecode | undefined; - setData(value?: MoveModuleBytecode): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteTableItem.AsObject; + static toObject(includeInstance: boolean, msg: DeleteTableItem): DeleteTableItem.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteTableItem, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteTableItem; + static deserializeBinaryFromReader(message: DeleteTableItem, reader: jspb.BinaryReader): DeleteTableItem; +} - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WriteModule.AsObject; - static toObject(includeInstance: boolean, msg: WriteModule): WriteModule.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WriteModule, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WriteModule; - static deserializeBinaryFromReader(message: WriteModule, reader: jspb.BinaryReader): WriteModule; +export namespace DeleteTableItem { + export type AsObject = { + stateKeyHash: Uint8Array | string, + handle: string, + key: string, + data?: DeleteTableData.AsObject, + } } -export namespace WriteModule { - export type AsObject = { - address: string, - stateKeyHash: Uint8Array | string, - data?: MoveModuleBytecode.AsObject, - } +export class DeleteTableData extends jspb.Message { + getKey(): string; + setKey(value: string): DeleteTableData; + getKeyType(): string; + setKeyType(value: string): DeleteTableData; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteTableData.AsObject; + static toObject(includeInstance: boolean, msg: DeleteTableData): DeleteTableData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteTableData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteTableData; + static deserializeBinaryFromReader(message: DeleteTableData, reader: jspb.BinaryReader): DeleteTableData; } -export class WriteResource extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; +export namespace DeleteTableData { + export type AsObject = { + key: string, + keyType: string, + } +} - getStateKeyHash(): Uint8Array | string; - getStateKeyHash_asU8(): Uint8Array; - getStateKeyHash_asB64(): string; - setStateKeyHash(value: Uint8Array | string): void; +export class WriteModule extends jspb.Message { + getAddress(): string; + setAddress(value: string): WriteModule; + getStateKeyHash(): Uint8Array | string; + getStateKeyHash_asU8(): Uint8Array; + getStateKeyHash_asB64(): string; + setStateKeyHash(value: Uint8Array | string): WriteModule; - hasType(): boolean; - clearType(): void; - getType(): MoveStructTag | undefined; - setType(value?: MoveStructTag): void; + hasData(): boolean; + clearData(): void; + getData(): MoveModuleBytecode | undefined; + setData(value?: MoveModuleBytecode): WriteModule; - getTypeStr(): string; - setTypeStr(value: string): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WriteModule.AsObject; + static toObject(includeInstance: boolean, msg: WriteModule): WriteModule.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: WriteModule, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WriteModule; + static deserializeBinaryFromReader(message: WriteModule, reader: jspb.BinaryReader): WriteModule; +} - getData(): string; - setData(value: string): void; +export namespace WriteModule { + export type AsObject = { + address: string, + stateKeyHash: Uint8Array | string, + data?: MoveModuleBytecode.AsObject, + } +} + +export class WriteResource extends jspb.Message { + getAddress(): string; + setAddress(value: string): WriteResource; + getStateKeyHash(): Uint8Array | string; + getStateKeyHash_asU8(): Uint8Array; + getStateKeyHash_asB64(): string; + setStateKeyHash(value: Uint8Array | string): WriteResource; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WriteResource.AsObject; - static toObject(includeInstance: boolean, msg: WriteResource): WriteResource.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WriteResource, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WriteResource; - static deserializeBinaryFromReader(message: WriteResource, reader: jspb.BinaryReader): WriteResource; + hasType(): boolean; + clearType(): void; + getType(): MoveStructTag | undefined; + setType(value?: MoveStructTag): WriteResource; + getTypeStr(): string; + setTypeStr(value: string): WriteResource; + getData(): string; + setData(value: string): WriteResource; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WriteResource.AsObject; + static toObject(includeInstance: boolean, msg: WriteResource): WriteResource.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: WriteResource, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WriteResource; + static deserializeBinaryFromReader(message: WriteResource, reader: jspb.BinaryReader): WriteResource; } export namespace WriteResource { - export type AsObject = { - address: string, - stateKeyHash: Uint8Array | string, - type?: MoveStructTag.AsObject, - typeStr: string, - data: string, - } + export type AsObject = { + address: string, + stateKeyHash: Uint8Array | string, + type?: MoveStructTag.AsObject, + typeStr: string, + data: string, + } } -export class WriteTableData extends jspb.Message { - getKey(): string; - setKey(value: string): void; +export class WriteTableData extends jspb.Message { + getKey(): string; + setKey(value: string): WriteTableData; + getKeyType(): string; + setKeyType(value: string): WriteTableData; + getValue(): string; + setValue(value: string): WriteTableData; + getValueType(): string; + setValueType(value: string): WriteTableData; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WriteTableData.AsObject; + static toObject(includeInstance: boolean, msg: WriteTableData): WriteTableData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: WriteTableData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WriteTableData; + static deserializeBinaryFromReader(message: WriteTableData, reader: jspb.BinaryReader): WriteTableData; +} - getKeyType(): string; - setKeyType(value: string): void; +export namespace WriteTableData { + export type AsObject = { + key: string, + keyType: string, + value: string, + valueType: string, + } +} - getValue(): string; - setValue(value: string): void; +export class WriteTableItem extends jspb.Message { + getStateKeyHash(): Uint8Array | string; + getStateKeyHash_asU8(): Uint8Array; + getStateKeyHash_asB64(): string; + setStateKeyHash(value: Uint8Array | string): WriteTableItem; + getHandle(): string; + setHandle(value: string): WriteTableItem; + getKey(): string; + setKey(value: string): WriteTableItem; - getValueType(): string; - setValueType(value: string): void; + hasData(): boolean; + clearData(): void; + getData(): WriteTableData | undefined; + setData(value?: WriteTableData): WriteTableItem; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WriteTableData.AsObject; - static toObject(includeInstance: boolean, msg: WriteTableData): WriteTableData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WriteTableData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WriteTableData; - static deserializeBinaryFromReader(message: WriteTableData, reader: jspb.BinaryReader): WriteTableData; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WriteTableItem.AsObject; + static toObject(includeInstance: boolean, msg: WriteTableItem): WriteTableItem.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: WriteTableItem, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WriteTableItem; + static deserializeBinaryFromReader(message: WriteTableItem, reader: jspb.BinaryReader): WriteTableItem; } -export namespace WriteTableData { - export type AsObject = { - key: string, - keyType: string, - value: string, - valueType: string, - } +export namespace WriteTableItem { + export type AsObject = { + stateKeyHash: Uint8Array | string, + handle: string, + key: string, + data?: WriteTableData.AsObject, + } } -export class WriteTableItem extends jspb.Message { - getStateKeyHash(): Uint8Array | string; - getStateKeyHash_asU8(): Uint8Array; - getStateKeyHash_asB64(): string; - setStateKeyHash(value: Uint8Array | string): void; +export class TransactionPayload extends jspb.Message { + getType(): TransactionPayload.Type; + setType(value: TransactionPayload.Type): TransactionPayload; - getHandle(): string; - setHandle(value: string): void; + hasEntryFunctionPayload(): boolean; + clearEntryFunctionPayload(): void; + getEntryFunctionPayload(): EntryFunctionPayload | undefined; + setEntryFunctionPayload(value?: EntryFunctionPayload): TransactionPayload; - getKey(): string; - setKey(value: string): void; + hasScriptPayload(): boolean; + clearScriptPayload(): void; + getScriptPayload(): ScriptPayload | undefined; + setScriptPayload(value?: ScriptPayload): TransactionPayload; - hasData(): boolean; - clearData(): void; - getData(): WriteTableData | undefined; - setData(value?: WriteTableData): void; + hasModuleBundlePayload(): boolean; + clearModuleBundlePayload(): void; + getModuleBundlePayload(): ModuleBundlePayload | undefined; + setModuleBundlePayload(value?: ModuleBundlePayload): TransactionPayload; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WriteTableItem.AsObject; - static toObject(includeInstance: boolean, msg: WriteTableItem): WriteTableItem.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WriteTableItem, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WriteTableItem; - static deserializeBinaryFromReader(message: WriteTableItem, reader: jspb.BinaryReader): WriteTableItem; -} + hasWriteSetPayload(): boolean; + clearWriteSetPayload(): void; + getWriteSetPayload(): WriteSetPayload | undefined; + setWriteSetPayload(value?: WriteSetPayload): TransactionPayload; -export namespace WriteTableItem { - export type AsObject = { - stateKeyHash: Uint8Array | string, - handle: string, - key: string, - data?: WriteTableData.AsObject, - } -} - -export class TransactionPayload extends jspb.Message { - getType(): TransactionPayload.TypeMap[keyof TransactionPayload.TypeMap]; - setType(value: TransactionPayload.TypeMap[keyof TransactionPayload.TypeMap]): void; - - hasEntryFunctionPayload(): boolean; - clearEntryFunctionPayload(): void; - getEntryFunctionPayload(): EntryFunctionPayload | undefined; - setEntryFunctionPayload(value?: EntryFunctionPayload): void; - - hasScriptPayload(): boolean; - clearScriptPayload(): void; - getScriptPayload(): ScriptPayload | undefined; - setScriptPayload(value?: ScriptPayload): void; - - hasModuleBundlePayload(): boolean; - clearModuleBundlePayload(): void; - getModuleBundlePayload(): ModuleBundlePayload | undefined; - setModuleBundlePayload(value?: ModuleBundlePayload): void; - - hasWriteSetPayload(): boolean; - clearWriteSetPayload(): void; - getWriteSetPayload(): WriteSetPayload | undefined; - setWriteSetPayload(value?: WriteSetPayload): void; - - hasMultisigPayload(): boolean; - clearMultisigPayload(): void; - getMultisigPayload(): MultisigPayload | undefined; - setMultisigPayload(value?: MultisigPayload): void; - - getPayloadCase(): TransactionPayload.PayloadCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TransactionPayload.AsObject; - static toObject(includeInstance: boolean, msg: TransactionPayload): TransactionPayload.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TransactionPayload, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TransactionPayload; - static deserializeBinaryFromReader(message: TransactionPayload, reader: jspb.BinaryReader): TransactionPayload; + hasMultisigPayload(): boolean; + clearMultisigPayload(): void; + getMultisigPayload(): MultisigPayload | undefined; + setMultisigPayload(value?: MultisigPayload): TransactionPayload; + + getPayloadCase(): TransactionPayload.PayloadCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransactionPayload.AsObject; + static toObject(includeInstance: boolean, msg: TransactionPayload): TransactionPayload.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TransactionPayload, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransactionPayload; + static deserializeBinaryFromReader(message: TransactionPayload, reader: jspb.BinaryReader): TransactionPayload; } export namespace TransactionPayload { - export type AsObject = { - type: TransactionPayload.TypeMap[keyof TransactionPayload.TypeMap], - entryFunctionPayload?: EntryFunctionPayload.AsObject, - scriptPayload?: ScriptPayload.AsObject, - moduleBundlePayload?: ModuleBundlePayload.AsObject, - writeSetPayload?: WriteSetPayload.AsObject, - multisigPayload?: MultisigPayload.AsObject, - } - - export interface TypeMap { - TYPE_UNSPECIFIED: 0; - TYPE_ENTRY_FUNCTION_PAYLOAD: 1; - TYPE_SCRIPT_PAYLOAD: 2; - TYPE_MODULE_BUNDLE_PAYLOAD: 3; - TYPE_WRITE_SET_PAYLOAD: 4; - TYPE_MULTISIG_PAYLOAD: 5; - } - - export const Type: TypeMap; - - export enum PayloadCase { - PAYLOAD_NOT_SET = 0, - ENTRY_FUNCTION_PAYLOAD = 2, - SCRIPT_PAYLOAD = 3, - MODULE_BUNDLE_PAYLOAD = 4, - WRITE_SET_PAYLOAD = 5, - MULTISIG_PAYLOAD = 6, - } -} - -export class EntryFunctionPayload extends jspb.Message { - hasFunction(): boolean; - clearFunction(): void; - getFunction(): EntryFunctionId | undefined; - setFunction(value?: EntryFunctionId): void; - - clearTypeArgumentsList(): void; - getTypeArgumentsList(): Array; - setTypeArgumentsList(value: Array): void; - addTypeArguments(value?: MoveType, index?: number): MoveType; - - clearArgumentsList(): void; - getArgumentsList(): Array; - setArgumentsList(value: Array): void; - addArguments(value: string, index?: number): string; - - getEntryFunctionIdStr(): string; - setEntryFunctionIdStr(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EntryFunctionPayload.AsObject; - static toObject(includeInstance: boolean, msg: EntryFunctionPayload): EntryFunctionPayload.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EntryFunctionPayload, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EntryFunctionPayload; - static deserializeBinaryFromReader(message: EntryFunctionPayload, reader: jspb.BinaryReader): EntryFunctionPayload; + export type AsObject = { + type: TransactionPayload.Type, + entryFunctionPayload?: EntryFunctionPayload.AsObject, + scriptPayload?: ScriptPayload.AsObject, + moduleBundlePayload?: ModuleBundlePayload.AsObject, + writeSetPayload?: WriteSetPayload.AsObject, + multisigPayload?: MultisigPayload.AsObject, + } + + export enum Type { + TYPE_UNSPECIFIED = 0, + TYPE_ENTRY_FUNCTION_PAYLOAD = 1, + TYPE_SCRIPT_PAYLOAD = 2, + TYPE_MODULE_BUNDLE_PAYLOAD = 3, + TYPE_WRITE_SET_PAYLOAD = 4, + TYPE_MULTISIG_PAYLOAD = 5, + } + + + export enum PayloadCase { + PAYLOAD_NOT_SET = 0, + ENTRY_FUNCTION_PAYLOAD = 2, + SCRIPT_PAYLOAD = 3, + MODULE_BUNDLE_PAYLOAD = 4, + WRITE_SET_PAYLOAD = 5, + MULTISIG_PAYLOAD = 6, + } + +} + +export class EntryFunctionPayload extends jspb.Message { + + hasFunction(): boolean; + clearFunction(): void; + getFunction(): EntryFunctionId | undefined; + setFunction(value?: EntryFunctionId): EntryFunctionPayload; + clearTypeArgumentsList(): void; + getTypeArgumentsList(): Array; + setTypeArgumentsList(value: Array): EntryFunctionPayload; + addTypeArguments(value?: MoveType, index?: number): MoveType; + clearArgumentsList(): void; + getArgumentsList(): Array; + setArgumentsList(value: Array): EntryFunctionPayload; + addArguments(value: string, index?: number): string; + getEntryFunctionIdStr(): string; + setEntryFunctionIdStr(value: string): EntryFunctionPayload; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EntryFunctionPayload.AsObject; + static toObject(includeInstance: boolean, msg: EntryFunctionPayload): EntryFunctionPayload.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EntryFunctionPayload, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EntryFunctionPayload; + static deserializeBinaryFromReader(message: EntryFunctionPayload, reader: jspb.BinaryReader): EntryFunctionPayload; } export namespace EntryFunctionPayload { - export type AsObject = { - pb_function?: EntryFunctionId.AsObject, - typeArgumentsList: Array, - argumentsList: Array, - entryFunctionIdStr: string, - } -} - -export class MoveScriptBytecode extends jspb.Message { - getBytecode(): Uint8Array | string; - getBytecode_asU8(): Uint8Array; - getBytecode_asB64(): string; - setBytecode(value: Uint8Array | string): void; - - hasAbi(): boolean; - clearAbi(): void; - getAbi(): MoveFunction | undefined; - setAbi(value?: MoveFunction): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MoveScriptBytecode.AsObject; - static toObject(includeInstance: boolean, msg: MoveScriptBytecode): MoveScriptBytecode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MoveScriptBytecode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MoveScriptBytecode; - static deserializeBinaryFromReader(message: MoveScriptBytecode, reader: jspb.BinaryReader): MoveScriptBytecode; + export type AsObject = { + pb_function?: EntryFunctionId.AsObject, + typeArgumentsList: Array, + argumentsList: Array, + entryFunctionIdStr: string, + } +} + +export class MoveScriptBytecode extends jspb.Message { + getBytecode(): Uint8Array | string; + getBytecode_asU8(): Uint8Array; + getBytecode_asB64(): string; + setBytecode(value: Uint8Array | string): MoveScriptBytecode; + + hasAbi(): boolean; + clearAbi(): void; + getAbi(): MoveFunction | undefined; + setAbi(value?: MoveFunction): MoveScriptBytecode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveScriptBytecode.AsObject; + static toObject(includeInstance: boolean, msg: MoveScriptBytecode): MoveScriptBytecode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveScriptBytecode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveScriptBytecode; + static deserializeBinaryFromReader(message: MoveScriptBytecode, reader: jspb.BinaryReader): MoveScriptBytecode; } export namespace MoveScriptBytecode { - export type AsObject = { - bytecode: Uint8Array | string, - abi?: MoveFunction.AsObject, - } -} - -export class ScriptPayload extends jspb.Message { - hasCode(): boolean; - clearCode(): void; - getCode(): MoveScriptBytecode | undefined; - setCode(value?: MoveScriptBytecode): void; - - clearTypeArgumentsList(): void; - getTypeArgumentsList(): Array; - setTypeArgumentsList(value: Array): void; - addTypeArguments(value?: MoveType, index?: number): MoveType; - - clearArgumentsList(): void; - getArgumentsList(): Array; - setArgumentsList(value: Array): void; - addArguments(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ScriptPayload.AsObject; - static toObject(includeInstance: boolean, msg: ScriptPayload): ScriptPayload.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ScriptPayload, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ScriptPayload; - static deserializeBinaryFromReader(message: ScriptPayload, reader: jspb.BinaryReader): ScriptPayload; + export type AsObject = { + bytecode: Uint8Array | string, + abi?: MoveFunction.AsObject, + } +} + +export class ScriptPayload extends jspb.Message { + + hasCode(): boolean; + clearCode(): void; + getCode(): MoveScriptBytecode | undefined; + setCode(value?: MoveScriptBytecode): ScriptPayload; + clearTypeArgumentsList(): void; + getTypeArgumentsList(): Array; + setTypeArgumentsList(value: Array): ScriptPayload; + addTypeArguments(value?: MoveType, index?: number): MoveType; + clearArgumentsList(): void; + getArgumentsList(): Array; + setArgumentsList(value: Array): ScriptPayload; + addArguments(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ScriptPayload.AsObject; + static toObject(includeInstance: boolean, msg: ScriptPayload): ScriptPayload.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ScriptPayload, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ScriptPayload; + static deserializeBinaryFromReader(message: ScriptPayload, reader: jspb.BinaryReader): ScriptPayload; } export namespace ScriptPayload { - export type AsObject = { - code?: MoveScriptBytecode.AsObject, - typeArgumentsList: Array, - argumentsList: Array, - } + export type AsObject = { + code?: MoveScriptBytecode.AsObject, + typeArgumentsList: Array, + argumentsList: Array, + } } -export class MultisigPayload extends jspb.Message { - getMultisigAddress(): string; - setMultisigAddress(value: string): void; +export class MultisigPayload extends jspb.Message { + getMultisigAddress(): string; + setMultisigAddress(value: string): MultisigPayload; - hasTransactionPayload(): boolean; - clearTransactionPayload(): void; - getTransactionPayload(): MultisigTransactionPayload | undefined; - setTransactionPayload(value?: MultisigTransactionPayload): void; + hasTransactionPayload(): boolean; + clearTransactionPayload(): void; + getTransactionPayload(): MultisigTransactionPayload | undefined; + setTransactionPayload(value?: MultisigTransactionPayload): MultisigPayload; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MultisigPayload.AsObject; - static toObject(includeInstance: boolean, msg: MultisigPayload): MultisigPayload.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MultisigPayload, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MultisigPayload; - static deserializeBinaryFromReader(message: MultisigPayload, reader: jspb.BinaryReader): MultisigPayload; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MultisigPayload.AsObject; + static toObject(includeInstance: boolean, msg: MultisigPayload): MultisigPayload.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MultisigPayload, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MultisigPayload; + static deserializeBinaryFromReader(message: MultisigPayload, reader: jspb.BinaryReader): MultisigPayload; } export namespace MultisigPayload { - export type AsObject = { - multisigAddress: string, - transactionPayload?: MultisigTransactionPayload.AsObject, - } + export type AsObject = { + multisigAddress: string, + transactionPayload?: MultisigTransactionPayload.AsObject, + } } -export class MultisigTransactionPayload extends jspb.Message { - getType(): MultisigTransactionPayload.TypeMap[keyof MultisigTransactionPayload.TypeMap]; - setType(value: MultisigTransactionPayload.TypeMap[keyof MultisigTransactionPayload.TypeMap]): void; +export class MultisigTransactionPayload extends jspb.Message { + getType(): MultisigTransactionPayload.Type; + setType(value: MultisigTransactionPayload.Type): MultisigTransactionPayload; + + hasEntryFunctionPayload(): boolean; + clearEntryFunctionPayload(): void; + getEntryFunctionPayload(): EntryFunctionPayload | undefined; + setEntryFunctionPayload(value?: EntryFunctionPayload): MultisigTransactionPayload; - hasEntryFunctionPayload(): boolean; - clearEntryFunctionPayload(): void; - getEntryFunctionPayload(): EntryFunctionPayload | undefined; - setEntryFunctionPayload(value?: EntryFunctionPayload): void; + getPayloadCase(): MultisigTransactionPayload.PayloadCase; - getPayloadCase(): MultisigTransactionPayload.PayloadCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MultisigTransactionPayload.AsObject; - static toObject(includeInstance: boolean, msg: MultisigTransactionPayload): MultisigTransactionPayload.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MultisigTransactionPayload, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MultisigTransactionPayload; - static deserializeBinaryFromReader(message: MultisigTransactionPayload, reader: jspb.BinaryReader): MultisigTransactionPayload; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MultisigTransactionPayload.AsObject; + static toObject(includeInstance: boolean, msg: MultisigTransactionPayload): MultisigTransactionPayload.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MultisigTransactionPayload, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MultisigTransactionPayload; + static deserializeBinaryFromReader(message: MultisigTransactionPayload, reader: jspb.BinaryReader): MultisigTransactionPayload; } export namespace MultisigTransactionPayload { - export type AsObject = { - type: MultisigTransactionPayload.TypeMap[keyof MultisigTransactionPayload.TypeMap], - entryFunctionPayload?: EntryFunctionPayload.AsObject, - } + export type AsObject = { + type: MultisigTransactionPayload.Type, + entryFunctionPayload?: EntryFunctionPayload.AsObject, + } + + export enum Type { + TYPE_UNSPECIFIED = 0, + TYPE_ENTRY_FUNCTION_PAYLOAD = 1, + } - export interface TypeMap { - TYPE_UNSPECIFIED: 0; - TYPE_ENTRY_FUNCTION_PAYLOAD: 1; - } - export const Type: TypeMap; + export enum PayloadCase { + PAYLOAD_NOT_SET = 0, + ENTRY_FUNCTION_PAYLOAD = 2, + } - export enum PayloadCase { - PAYLOAD_NOT_SET = 0, - ENTRY_FUNCTION_PAYLOAD = 2, - } } -export class ModuleBundlePayload extends jspb.Message { - clearModulesList(): void; - getModulesList(): Array; - setModulesList(value: Array): void; - addModules(value?: MoveModuleBytecode, index?: number): MoveModuleBytecode; +export class ModuleBundlePayload extends jspb.Message { + clearModulesList(): void; + getModulesList(): Array; + setModulesList(value: Array): ModuleBundlePayload; + addModules(value?: MoveModuleBytecode, index?: number): MoveModuleBytecode; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ModuleBundlePayload.AsObject; - static toObject(includeInstance: boolean, msg: ModuleBundlePayload): ModuleBundlePayload.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ModuleBundlePayload, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ModuleBundlePayload; - static deserializeBinaryFromReader(message: ModuleBundlePayload, reader: jspb.BinaryReader): ModuleBundlePayload; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ModuleBundlePayload.AsObject; + static toObject(includeInstance: boolean, msg: ModuleBundlePayload): ModuleBundlePayload.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ModuleBundlePayload, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ModuleBundlePayload; + static deserializeBinaryFromReader(message: ModuleBundlePayload, reader: jspb.BinaryReader): ModuleBundlePayload; } export namespace ModuleBundlePayload { - export type AsObject = { - modulesList: Array, - } + export type AsObject = { + modulesList: Array, + } } -export class MoveModuleBytecode extends jspb.Message { - getBytecode(): Uint8Array | string; - getBytecode_asU8(): Uint8Array; - getBytecode_asB64(): string; - setBytecode(value: Uint8Array | string): void; +export class MoveModuleBytecode extends jspb.Message { + getBytecode(): Uint8Array | string; + getBytecode_asU8(): Uint8Array; + getBytecode_asB64(): string; + setBytecode(value: Uint8Array | string): MoveModuleBytecode; - hasAbi(): boolean; - clearAbi(): void; - getAbi(): MoveModule | undefined; - setAbi(value?: MoveModule): void; + hasAbi(): boolean; + clearAbi(): void; + getAbi(): MoveModule | undefined; + setAbi(value?: MoveModule): MoveModuleBytecode; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MoveModuleBytecode.AsObject; - static toObject(includeInstance: boolean, msg: MoveModuleBytecode): MoveModuleBytecode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MoveModuleBytecode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MoveModuleBytecode; - static deserializeBinaryFromReader(message: MoveModuleBytecode, reader: jspb.BinaryReader): MoveModuleBytecode; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveModuleBytecode.AsObject; + static toObject(includeInstance: boolean, msg: MoveModuleBytecode): MoveModuleBytecode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveModuleBytecode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveModuleBytecode; + static deserializeBinaryFromReader(message: MoveModuleBytecode, reader: jspb.BinaryReader): MoveModuleBytecode; } export namespace MoveModuleBytecode { - export type AsObject = { - bytecode: Uint8Array | string, - abi?: MoveModule.AsObject, - } + export type AsObject = { + bytecode: Uint8Array | string, + abi?: MoveModule.AsObject, + } } -export class MoveModule extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; - - getName(): string; - setName(value: string): void; +export class MoveModule extends jspb.Message { + getAddress(): string; + setAddress(value: string): MoveModule; + getName(): string; + setName(value: string): MoveModule; + clearFriendsList(): void; + getFriendsList(): Array; + setFriendsList(value: Array): MoveModule; + addFriends(value?: MoveModuleId, index?: number): MoveModuleId; + clearExposedFunctionsList(): void; + getExposedFunctionsList(): Array; + setExposedFunctionsList(value: Array): MoveModule; + addExposedFunctions(value?: MoveFunction, index?: number): MoveFunction; + clearStructsList(): void; + getStructsList(): Array; + setStructsList(value: Array): MoveModule; + addStructs(value?: MoveStruct, index?: number): MoveStruct; - clearFriendsList(): void; - getFriendsList(): Array; - setFriendsList(value: Array): void; - addFriends(value?: MoveModuleId, index?: number): MoveModuleId; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveModule.AsObject; + static toObject(includeInstance: boolean, msg: MoveModule): MoveModule.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveModule, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveModule; + static deserializeBinaryFromReader(message: MoveModule, reader: jspb.BinaryReader): MoveModule; +} - clearExposedFunctionsList(): void; - getExposedFunctionsList(): Array; - setExposedFunctionsList(value: Array): void; - addExposedFunctions(value?: MoveFunction, index?: number): MoveFunction; +export namespace MoveModule { + export type AsObject = { + address: string, + name: string, + friendsList: Array, + exposedFunctionsList: Array, + structsList: Array, + } +} - clearStructsList(): void; - getStructsList(): Array; - setStructsList(value: Array): void; - addStructs(value?: MoveStruct, index?: number): MoveStruct; +export class MoveFunction extends jspb.Message { + getName(): string; + setName(value: string): MoveFunction; + getVisibility(): MoveFunction.Visibility; + setVisibility(value: MoveFunction.Visibility): MoveFunction; + getIsEntry(): boolean; + setIsEntry(value: boolean): MoveFunction; + clearGenericTypeParamsList(): void; + getGenericTypeParamsList(): Array; + setGenericTypeParamsList(value: Array): MoveFunction; + addGenericTypeParams(value?: MoveFunctionGenericTypeParam, index?: number): MoveFunctionGenericTypeParam; + clearParamsList(): void; + getParamsList(): Array; + setParamsList(value: Array): MoveFunction; + addParams(value?: MoveType, index?: number): MoveType; + clearReturnList(): void; + getReturnList(): Array; + setReturnList(value: Array): MoveFunction; + addReturn(value?: MoveType, index?: number): MoveType; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MoveModule.AsObject; - static toObject(includeInstance: boolean, msg: MoveModule): MoveModule.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MoveModule, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MoveModule; - static deserializeBinaryFromReader(message: MoveModule, reader: jspb.BinaryReader): MoveModule; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveFunction.AsObject; + static toObject(includeInstance: boolean, msg: MoveFunction): MoveFunction.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveFunction, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveFunction; + static deserializeBinaryFromReader(message: MoveFunction, reader: jspb.BinaryReader): MoveFunction; } -export namespace MoveModule { - export type AsObject = { - address: string, - name: string, - friendsList: Array, - exposedFunctionsList: Array, - structsList: Array, - } -} - -export class MoveFunction extends jspb.Message { - getName(): string; - setName(value: string): void; - - getVisibility(): MoveFunction.VisibilityMap[keyof MoveFunction.VisibilityMap]; - setVisibility(value: MoveFunction.VisibilityMap[keyof MoveFunction.VisibilityMap]): void; - - getIsEntry(): boolean; - setIsEntry(value: boolean): void; - - clearGenericTypeParamsList(): void; - getGenericTypeParamsList(): Array; - setGenericTypeParamsList(value: Array): void; - addGenericTypeParams(value?: MoveFunctionGenericTypeParam, index?: number): MoveFunctionGenericTypeParam; - - clearParamsList(): void; - getParamsList(): Array; - setParamsList(value: Array): void; - addParams(value?: MoveType, index?: number): MoveType; - - clearReturnList(): void; - getReturnList(): Array; - setReturnList(value: Array): void; - addReturn(value?: MoveType, index?: number): MoveType; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MoveFunction.AsObject; - static toObject(includeInstance: boolean, msg: MoveFunction): MoveFunction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MoveFunction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MoveFunction; - static deserializeBinaryFromReader(message: MoveFunction, reader: jspb.BinaryReader): MoveFunction; +export namespace MoveFunction { + export type AsObject = { + name: string, + visibility: MoveFunction.Visibility, + isEntry: boolean, + genericTypeParamsList: Array, + paramsList: Array, + pb_returnList: Array, + } + + export enum Visibility { + VISIBILITY_UNSPECIFIED = 0, + VISIBILITY_PRIVATE = 1, + VISIBILITY_PUBLIC = 2, + VISIBILITY_FRIEND = 3, + } + } -export namespace MoveFunction { - export type AsObject = { - name: string, - visibility: MoveFunction.VisibilityMap[keyof MoveFunction.VisibilityMap], - isEntry: boolean, - genericTypeParamsList: Array, - paramsList: Array, - returnList: Array, - } - - export interface VisibilityMap { - VISIBILITY_UNSPECIFIED: 0; - VISIBILITY_PRIVATE: 1; - VISIBILITY_PUBLIC: 2; - VISIBILITY_FRIEND: 3; - } - - export const Visibility: VisibilityMap; -} - -export class MoveStruct extends jspb.Message { - getName(): string; - setName(value: string): void; - - getIsNative(): boolean; - setIsNative(value: boolean): void; - - clearAbilitiesList(): void; - getAbilitiesList(): Array; - setAbilitiesList(value: Array): void; - addAbilities(value: MoveAbilityMap[keyof MoveAbilityMap], index?: number): MoveAbilityMap[keyof MoveAbilityMap]; - - clearGenericTypeParamsList(): void; - getGenericTypeParamsList(): Array; - setGenericTypeParamsList(value: Array): void; - addGenericTypeParams(value?: MoveStructGenericTypeParam, index?: number): MoveStructGenericTypeParam; - - clearFieldsList(): void; - getFieldsList(): Array; - setFieldsList(value: Array): void; - addFields(value?: MoveStructField, index?: number): MoveStructField; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MoveStruct.AsObject; - static toObject(includeInstance: boolean, msg: MoveStruct): MoveStruct.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MoveStruct, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MoveStruct; - static deserializeBinaryFromReader(message: MoveStruct, reader: jspb.BinaryReader): MoveStruct; +export class MoveStruct extends jspb.Message { + getName(): string; + setName(value: string): MoveStruct; + getIsNative(): boolean; + setIsNative(value: boolean): MoveStruct; + clearAbilitiesList(): void; + getAbilitiesList(): Array; + setAbilitiesList(value: Array): MoveStruct; + addAbilities(value: MoveAbility, index?: number): MoveAbility; + clearGenericTypeParamsList(): void; + getGenericTypeParamsList(): Array; + setGenericTypeParamsList(value: Array): MoveStruct; + addGenericTypeParams(value?: MoveStructGenericTypeParam, index?: number): MoveStructGenericTypeParam; + clearFieldsList(): void; + getFieldsList(): Array; + setFieldsList(value: Array): MoveStruct; + addFields(value?: MoveStructField, index?: number): MoveStructField; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveStruct.AsObject; + static toObject(includeInstance: boolean, msg: MoveStruct): MoveStruct.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveStruct, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveStruct; + static deserializeBinaryFromReader(message: MoveStruct, reader: jspb.BinaryReader): MoveStruct; } export namespace MoveStruct { - export type AsObject = { - name: string, - isNative: boolean, - abilitiesList: Array, - genericTypeParamsList: Array, - fieldsList: Array, - } -} - -export class MoveStructGenericTypeParam extends jspb.Message { - clearConstraintsList(): void; - getConstraintsList(): Array; - setConstraintsList(value: Array): void; - addConstraints(value: MoveAbilityMap[keyof MoveAbilityMap], index?: number): MoveAbilityMap[keyof MoveAbilityMap]; - - getIsPhantom(): boolean; - setIsPhantom(value: boolean): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MoveStructGenericTypeParam.AsObject; - static toObject(includeInstance: boolean, msg: MoveStructGenericTypeParam): MoveStructGenericTypeParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MoveStructGenericTypeParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MoveStructGenericTypeParam; - static deserializeBinaryFromReader(message: MoveStructGenericTypeParam, reader: jspb.BinaryReader): MoveStructGenericTypeParam; + export type AsObject = { + name: string, + isNative: boolean, + abilitiesList: Array, + genericTypeParamsList: Array, + fieldsList: Array, + } +} + +export class MoveStructGenericTypeParam extends jspb.Message { + clearConstraintsList(): void; + getConstraintsList(): Array; + setConstraintsList(value: Array): MoveStructGenericTypeParam; + addConstraints(value: MoveAbility, index?: number): MoveAbility; + getIsPhantom(): boolean; + setIsPhantom(value: boolean): MoveStructGenericTypeParam; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveStructGenericTypeParam.AsObject; + static toObject(includeInstance: boolean, msg: MoveStructGenericTypeParam): MoveStructGenericTypeParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveStructGenericTypeParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveStructGenericTypeParam; + static deserializeBinaryFromReader(message: MoveStructGenericTypeParam, reader: jspb.BinaryReader): MoveStructGenericTypeParam; } export namespace MoveStructGenericTypeParam { - export type AsObject = { - constraintsList: Array, - isPhantom: boolean, - } + export type AsObject = { + constraintsList: Array, + isPhantom: boolean, + } } -export class MoveStructField extends jspb.Message { - getName(): string; - setName(value: string): void; +export class MoveStructField extends jspb.Message { + getName(): string; + setName(value: string): MoveStructField; - hasType(): boolean; - clearType(): void; - getType(): MoveType | undefined; - setType(value?: MoveType): void; + hasType(): boolean; + clearType(): void; + getType(): MoveType | undefined; + setType(value?: MoveType): MoveStructField; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MoveStructField.AsObject; - static toObject(includeInstance: boolean, msg: MoveStructField): MoveStructField.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MoveStructField, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MoveStructField; - static deserializeBinaryFromReader(message: MoveStructField, reader: jspb.BinaryReader): MoveStructField; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveStructField.AsObject; + static toObject(includeInstance: boolean, msg: MoveStructField): MoveStructField.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveStructField, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveStructField; + static deserializeBinaryFromReader(message: MoveStructField, reader: jspb.BinaryReader): MoveStructField; } export namespace MoveStructField { - export type AsObject = { - name: string, - type?: MoveType.AsObject, - } + export type AsObject = { + name: string, + type?: MoveType.AsObject, + } } -export class MoveFunctionGenericTypeParam extends jspb.Message { - clearConstraintsList(): void; - getConstraintsList(): Array; - setConstraintsList(value: Array): void; - addConstraints(value: MoveAbilityMap[keyof MoveAbilityMap], index?: number): MoveAbilityMap[keyof MoveAbilityMap]; +export class MoveFunctionGenericTypeParam extends jspb.Message { + clearConstraintsList(): void; + getConstraintsList(): Array; + setConstraintsList(value: Array): MoveFunctionGenericTypeParam; + addConstraints(value: MoveAbility, index?: number): MoveAbility; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MoveFunctionGenericTypeParam.AsObject; - static toObject(includeInstance: boolean, msg: MoveFunctionGenericTypeParam): MoveFunctionGenericTypeParam.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MoveFunctionGenericTypeParam, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MoveFunctionGenericTypeParam; - static deserializeBinaryFromReader(message: MoveFunctionGenericTypeParam, reader: jspb.BinaryReader): MoveFunctionGenericTypeParam; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveFunctionGenericTypeParam.AsObject; + static toObject(includeInstance: boolean, msg: MoveFunctionGenericTypeParam): MoveFunctionGenericTypeParam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveFunctionGenericTypeParam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveFunctionGenericTypeParam; + static deserializeBinaryFromReader(message: MoveFunctionGenericTypeParam, reader: jspb.BinaryReader): MoveFunctionGenericTypeParam; } export namespace MoveFunctionGenericTypeParam { - export type AsObject = { - constraintsList: Array, - } -} - -export class MoveType extends jspb.Message { - getType(): MoveTypesMap[keyof MoveTypesMap]; - setType(value: MoveTypesMap[keyof MoveTypesMap]): void; - - hasVector(): boolean; - clearVector(): void; - getVector(): MoveType | undefined; - setVector(value?: MoveType): void; - - hasStruct(): boolean; - clearStruct(): void; - getStruct(): MoveStructTag | undefined; - setStruct(value?: MoveStructTag): void; - - hasGenericTypeParamIndex(): boolean; - clearGenericTypeParamIndex(): void; - getGenericTypeParamIndex(): number; - setGenericTypeParamIndex(value: number): void; - - hasReference(): boolean; - clearReference(): void; - getReference(): MoveType.ReferenceType | undefined; - setReference(value?: MoveType.ReferenceType): void; - - hasUnparsable(): boolean; - clearUnparsable(): void; - getUnparsable(): string; - setUnparsable(value: string): void; - - getContentCase(): MoveType.ContentCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MoveType.AsObject; - static toObject(includeInstance: boolean, msg: MoveType): MoveType.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MoveType, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MoveType; - static deserializeBinaryFromReader(message: MoveType, reader: jspb.BinaryReader): MoveType; + export type AsObject = { + constraintsList: Array, + } } -export namespace MoveType { - export type AsObject = { - type: MoveTypesMap[keyof MoveTypesMap], - vector?: MoveType.AsObject, - struct?: MoveStructTag.AsObject, - genericTypeParamIndex: number, - reference?: MoveType.ReferenceType.AsObject, - unparsable: string, - } - - export class ReferenceType extends jspb.Message { - getMutable(): boolean; - setMutable(value: boolean): void; - - hasTo(): boolean; - clearTo(): void; - getTo(): MoveType | undefined; - setTo(value?: MoveType): void; +export class MoveType extends jspb.Message { + getType(): MoveTypes; + setType(value: MoveTypes): MoveType; + + hasVector(): boolean; + clearVector(): void; + getVector(): MoveType | undefined; + setVector(value?: MoveType): MoveType; + + hasStruct(): boolean; + clearStruct(): void; + getStruct(): MoveStructTag | undefined; + setStruct(value?: MoveStructTag): MoveType; + + hasGenericTypeParamIndex(): boolean; + clearGenericTypeParamIndex(): void; + getGenericTypeParamIndex(): number; + setGenericTypeParamIndex(value: number): MoveType; + + hasReference(): boolean; + clearReference(): void; + getReference(): MoveType.ReferenceType | undefined; + setReference(value?: MoveType.ReferenceType): MoveType; + + hasUnparsable(): boolean; + clearUnparsable(): void; + getUnparsable(): string; + setUnparsable(value: string): MoveType; + + getContentCase(): MoveType.ContentCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReferenceType.AsObject; - static toObject(includeInstance: boolean, msg: ReferenceType): ReferenceType.AsObject; + toObject(includeInstance?: boolean): MoveType.AsObject; + static toObject(includeInstance: boolean, msg: MoveType): MoveType.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ReferenceType, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReferenceType; - static deserializeBinaryFromReader(message: ReferenceType, reader: jspb.BinaryReader): ReferenceType; - } + static serializeBinaryToWriter(message: MoveType, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveType; + static deserializeBinaryFromReader(message: MoveType, reader: jspb.BinaryReader): MoveType; +} - export namespace ReferenceType { +export namespace MoveType { export type AsObject = { - mutable: boolean, - to?: MoveType.AsObject, + type: MoveTypes, + vector?: MoveType.AsObject, + struct?: MoveStructTag.AsObject, + genericTypeParamIndex: number, + reference?: MoveType.ReferenceType.AsObject, + unparsable: string, + } + + + export class ReferenceType extends jspb.Message { + getMutable(): boolean; + setMutable(value: boolean): ReferenceType; + + hasTo(): boolean; + clearTo(): void; + getTo(): MoveType | undefined; + setTo(value?: MoveType): ReferenceType; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ReferenceType.AsObject; + static toObject(includeInstance: boolean, msg: ReferenceType): ReferenceType.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ReferenceType, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ReferenceType; + static deserializeBinaryFromReader(message: ReferenceType, reader: jspb.BinaryReader): ReferenceType; + } + + export namespace ReferenceType { + export type AsObject = { + mutable: boolean, + to?: MoveType.AsObject, + } + } + + + export enum ContentCase { + CONTENT_NOT_SET = 0, + VECTOR = 3, + STRUCT = 4, + GENERIC_TYPE_PARAM_INDEX = 5, + REFERENCE = 6, + UNPARSABLE = 7, } - } - export enum ContentCase { - CONTENT_NOT_SET = 0, - VECTOR = 3, - STRUCT = 4, - GENERIC_TYPE_PARAM_INDEX = 5, - REFERENCE = 6, - UNPARSABLE = 7, - } } -export class WriteSetPayload extends jspb.Message { - hasWriteSet(): boolean; - clearWriteSet(): void; - getWriteSet(): WriteSet | undefined; - setWriteSet(value?: WriteSet): void; +export class WriteSetPayload extends jspb.Message { + + hasWriteSet(): boolean; + clearWriteSet(): void; + getWriteSet(): WriteSet | undefined; + setWriteSet(value?: WriteSet): WriteSetPayload; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WriteSetPayload.AsObject; - static toObject(includeInstance: boolean, msg: WriteSetPayload): WriteSetPayload.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WriteSetPayload, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WriteSetPayload; - static deserializeBinaryFromReader(message: WriteSetPayload, reader: jspb.BinaryReader): WriteSetPayload; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WriteSetPayload.AsObject; + static toObject(includeInstance: boolean, msg: WriteSetPayload): WriteSetPayload.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: WriteSetPayload, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WriteSetPayload; + static deserializeBinaryFromReader(message: WriteSetPayload, reader: jspb.BinaryReader): WriteSetPayload; } export namespace WriteSetPayload { - export type AsObject = { - writeSet?: WriteSet.AsObject, - } + export type AsObject = { + writeSet?: WriteSet.AsObject, + } } -export class EntryFunctionId extends jspb.Message { - hasModule(): boolean; - clearModule(): void; - getModule(): MoveModuleId | undefined; - setModule(value?: MoveModuleId): void; +export class EntryFunctionId extends jspb.Message { - getName(): string; - setName(value: string): void; + hasModule(): boolean; + clearModule(): void; + getModule(): MoveModuleId | undefined; + setModule(value?: MoveModuleId): EntryFunctionId; + getName(): string; + setName(value: string): EntryFunctionId; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EntryFunctionId.AsObject; - static toObject(includeInstance: boolean, msg: EntryFunctionId): EntryFunctionId.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EntryFunctionId, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EntryFunctionId; - static deserializeBinaryFromReader(message: EntryFunctionId, reader: jspb.BinaryReader): EntryFunctionId; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EntryFunctionId.AsObject; + static toObject(includeInstance: boolean, msg: EntryFunctionId): EntryFunctionId.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EntryFunctionId, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EntryFunctionId; + static deserializeBinaryFromReader(message: EntryFunctionId, reader: jspb.BinaryReader): EntryFunctionId; } export namespace EntryFunctionId { - export type AsObject = { - module?: MoveModuleId.AsObject, - name: string, - } + export type AsObject = { + module?: MoveModuleId.AsObject, + name: string, + } } -export class MoveModuleId extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; - - getName(): string; - setName(value: string): void; +export class MoveModuleId extends jspb.Message { + getAddress(): string; + setAddress(value: string): MoveModuleId; + getName(): string; + setName(value: string): MoveModuleId; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MoveModuleId.AsObject; - static toObject(includeInstance: boolean, msg: MoveModuleId): MoveModuleId.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MoveModuleId, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MoveModuleId; - static deserializeBinaryFromReader(message: MoveModuleId, reader: jspb.BinaryReader): MoveModuleId; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveModuleId.AsObject; + static toObject(includeInstance: boolean, msg: MoveModuleId): MoveModuleId.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveModuleId, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveModuleId; + static deserializeBinaryFromReader(message: MoveModuleId, reader: jspb.BinaryReader): MoveModuleId; } export namespace MoveModuleId { - export type AsObject = { - address: string, - name: string, - } + export type AsObject = { + address: string, + name: string, + } } -export class MoveStructTag extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; +export class MoveStructTag extends jspb.Message { + getAddress(): string; + setAddress(value: string): MoveStructTag; + getModule(): string; + setModule(value: string): MoveStructTag; + getName(): string; + setName(value: string): MoveStructTag; + clearGenericTypeParamsList(): void; + getGenericTypeParamsList(): Array; + setGenericTypeParamsList(value: Array): MoveStructTag; + addGenericTypeParams(value?: MoveType, index?: number): MoveType; - getModule(): string; - setModule(value: string): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveStructTag.AsObject; + static toObject(includeInstance: boolean, msg: MoveStructTag): MoveStructTag.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveStructTag, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveStructTag; + static deserializeBinaryFromReader(message: MoveStructTag, reader: jspb.BinaryReader): MoveStructTag; +} - getName(): string; - setName(value: string): void; +export namespace MoveStructTag { + export type AsObject = { + address: string, + module: string, + name: string, + genericTypeParamsList: Array, + } +} - clearGenericTypeParamsList(): void; - getGenericTypeParamsList(): Array; - setGenericTypeParamsList(value: Array): void; - addGenericTypeParams(value?: MoveType, index?: number): MoveType; +export class Signature extends jspb.Message { + getType(): Signature.Type; + setType(value: Signature.Type): Signature; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MoveStructTag.AsObject; - static toObject(includeInstance: boolean, msg: MoveStructTag): MoveStructTag.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MoveStructTag, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MoveStructTag; - static deserializeBinaryFromReader(message: MoveStructTag, reader: jspb.BinaryReader): MoveStructTag; -} + hasEd25519(): boolean; + clearEd25519(): void; + getEd25519(): Ed25519Signature | undefined; + setEd25519(value?: Ed25519Signature): Signature; -export namespace MoveStructTag { - export type AsObject = { - address: string, - module: string, - name: string, - genericTypeParamsList: Array, - } -} - -export class Signature extends jspb.Message { - getType(): Signature.TypeMap[keyof Signature.TypeMap]; - setType(value: Signature.TypeMap[keyof Signature.TypeMap]): void; - - hasEd25519(): boolean; - clearEd25519(): void; - getEd25519(): Ed25519Signature | undefined; - setEd25519(value?: Ed25519Signature): void; - - hasMultiEd25519(): boolean; - clearMultiEd25519(): void; - getMultiEd25519(): MultiEd25519Signature | undefined; - setMultiEd25519(value?: MultiEd25519Signature): void; - - hasMultiAgent(): boolean; - clearMultiAgent(): void; - getMultiAgent(): MultiAgentSignature | undefined; - setMultiAgent(value?: MultiAgentSignature): void; - - getSignatureCase(): Signature.SignatureCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Signature.AsObject; - static toObject(includeInstance: boolean, msg: Signature): Signature.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Signature, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Signature; - static deserializeBinaryFromReader(message: Signature, reader: jspb.BinaryReader): Signature; + hasMultiEd25519(): boolean; + clearMultiEd25519(): void; + getMultiEd25519(): MultiEd25519Signature | undefined; + setMultiEd25519(value?: MultiEd25519Signature): Signature; + + hasMultiAgent(): boolean; + clearMultiAgent(): void; + getMultiAgent(): MultiAgentSignature | undefined; + setMultiAgent(value?: MultiAgentSignature): Signature; + + getSignatureCase(): Signature.SignatureCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Signature.AsObject; + static toObject(includeInstance: boolean, msg: Signature): Signature.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Signature, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Signature; + static deserializeBinaryFromReader(message: Signature, reader: jspb.BinaryReader): Signature; } export namespace Signature { - export type AsObject = { - type: Signature.TypeMap[keyof Signature.TypeMap], - ed25519?: Ed25519Signature.AsObject, - multiEd25519?: MultiEd25519Signature.AsObject, - multiAgent?: MultiAgentSignature.AsObject, - } - - export interface TypeMap { - TYPE_UNSPECIFIED: 0; - TYPE_ED25519: 1; - TYPE_MULTI_ED25519: 2; - TYPE_MULTI_AGENT: 3; - } - - export const Type: TypeMap; - - export enum SignatureCase { - SIGNATURE_NOT_SET = 0, - ED25519 = 2, - MULTI_ED25519 = 3, - MULTI_AGENT = 4, - } -} - -export class Ed25519Signature extends jspb.Message { - getPublicKey(): Uint8Array | string; - getPublicKey_asU8(): Uint8Array; - getPublicKey_asB64(): string; - setPublicKey(value: Uint8Array | string): void; - - getSignature(): Uint8Array | string; - getSignature_asU8(): Uint8Array; - getSignature_asB64(): string; - setSignature(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Ed25519Signature.AsObject; - static toObject(includeInstance: boolean, msg: Ed25519Signature): Ed25519Signature.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Ed25519Signature, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Ed25519Signature; - static deserializeBinaryFromReader(message: Ed25519Signature, reader: jspb.BinaryReader): Ed25519Signature; + export type AsObject = { + type: Signature.Type, + ed25519?: Ed25519Signature.AsObject, + multiEd25519?: MultiEd25519Signature.AsObject, + multiAgent?: MultiAgentSignature.AsObject, + } + + export enum Type { + TYPE_UNSPECIFIED = 0, + TYPE_ED25519 = 1, + TYPE_MULTI_ED25519 = 2, + TYPE_MULTI_AGENT = 3, + } + + + export enum SignatureCase { + SIGNATURE_NOT_SET = 0, + ED25519 = 2, + MULTI_ED25519 = 3, + MULTI_AGENT = 4, + } + +} + +export class Ed25519Signature extends jspb.Message { + getPublicKey(): Uint8Array | string; + getPublicKey_asU8(): Uint8Array; + getPublicKey_asB64(): string; + setPublicKey(value: Uint8Array | string): Ed25519Signature; + getSignature(): Uint8Array | string; + getSignature_asU8(): Uint8Array; + getSignature_asB64(): string; + setSignature(value: Uint8Array | string): Ed25519Signature; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Ed25519Signature.AsObject; + static toObject(includeInstance: boolean, msg: Ed25519Signature): Ed25519Signature.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Ed25519Signature, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Ed25519Signature; + static deserializeBinaryFromReader(message: Ed25519Signature, reader: jspb.BinaryReader): Ed25519Signature; } export namespace Ed25519Signature { - export type AsObject = { - publicKey: Uint8Array | string, - signature: Uint8Array | string, - } -} - -export class MultiEd25519Signature extends jspb.Message { - clearPublicKeysList(): void; - getPublicKeysList(): Array; - getPublicKeysList_asU8(): Array; - getPublicKeysList_asB64(): Array; - setPublicKeysList(value: Array): void; - addPublicKeys(value: Uint8Array | string, index?: number): Uint8Array | string; - - clearSignaturesList(): void; - getSignaturesList(): Array; - getSignaturesList_asU8(): Array; - getSignaturesList_asB64(): Array; - setSignaturesList(value: Array): void; - addSignatures(value: Uint8Array | string, index?: number): Uint8Array | string; - - getThreshold(): number; - setThreshold(value: number): void; - - clearPublicKeyIndicesList(): void; - getPublicKeyIndicesList(): Array; - setPublicKeyIndicesList(value: Array): void; - addPublicKeyIndices(value: number, index?: number): number; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MultiEd25519Signature.AsObject; - static toObject(includeInstance: boolean, msg: MultiEd25519Signature): MultiEd25519Signature.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MultiEd25519Signature, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MultiEd25519Signature; - static deserializeBinaryFromReader(message: MultiEd25519Signature, reader: jspb.BinaryReader): MultiEd25519Signature; + export type AsObject = { + publicKey: Uint8Array | string, + signature: Uint8Array | string, + } +} + +export class MultiEd25519Signature extends jspb.Message { + clearPublicKeysList(): void; + getPublicKeysList(): Array; + getPublicKeysList_asU8(): Array; + getPublicKeysList_asB64(): Array; + setPublicKeysList(value: Array): MultiEd25519Signature; + addPublicKeys(value: Uint8Array | string, index?: number): Uint8Array | string; + clearSignaturesList(): void; + getSignaturesList(): Array; + getSignaturesList_asU8(): Array; + getSignaturesList_asB64(): Array; + setSignaturesList(value: Array): MultiEd25519Signature; + addSignatures(value: Uint8Array | string, index?: number): Uint8Array | string; + getThreshold(): number; + setThreshold(value: number): MultiEd25519Signature; + clearPublicKeyIndicesList(): void; + getPublicKeyIndicesList(): Array; + setPublicKeyIndicesList(value: Array): MultiEd25519Signature; + addPublicKeyIndices(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MultiEd25519Signature.AsObject; + static toObject(includeInstance: boolean, msg: MultiEd25519Signature): MultiEd25519Signature.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MultiEd25519Signature, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MultiEd25519Signature; + static deserializeBinaryFromReader(message: MultiEd25519Signature, reader: jspb.BinaryReader): MultiEd25519Signature; } export namespace MultiEd25519Signature { - export type AsObject = { - publicKeysList: Array, - signaturesList: Array, - threshold: number, - publicKeyIndicesList: Array, - } -} - -export class MultiAgentSignature extends jspb.Message { - hasSender(): boolean; - clearSender(): void; - getSender(): AccountSignature | undefined; - setSender(value?: AccountSignature): void; - - clearSecondarySignerAddressesList(): void; - getSecondarySignerAddressesList(): Array; - setSecondarySignerAddressesList(value: Array): void; - addSecondarySignerAddresses(value: string, index?: number): string; - - clearSecondarySignersList(): void; - getSecondarySignersList(): Array; - setSecondarySignersList(value: Array): void; - addSecondarySigners(value?: AccountSignature, index?: number): AccountSignature; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MultiAgentSignature.AsObject; - static toObject(includeInstance: boolean, msg: MultiAgentSignature): MultiAgentSignature.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MultiAgentSignature, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MultiAgentSignature; - static deserializeBinaryFromReader(message: MultiAgentSignature, reader: jspb.BinaryReader): MultiAgentSignature; + export type AsObject = { + publicKeysList: Array, + signaturesList: Array, + threshold: number, + publicKeyIndicesList: Array, + } +} + +export class MultiAgentSignature extends jspb.Message { + + hasSender(): boolean; + clearSender(): void; + getSender(): AccountSignature | undefined; + setSender(value?: AccountSignature): MultiAgentSignature; + clearSecondarySignerAddressesList(): void; + getSecondarySignerAddressesList(): Array; + setSecondarySignerAddressesList(value: Array): MultiAgentSignature; + addSecondarySignerAddresses(value: string, index?: number): string; + clearSecondarySignersList(): void; + getSecondarySignersList(): Array; + setSecondarySignersList(value: Array): MultiAgentSignature; + addSecondarySigners(value?: AccountSignature, index?: number): AccountSignature; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MultiAgentSignature.AsObject; + static toObject(includeInstance: boolean, msg: MultiAgentSignature): MultiAgentSignature.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MultiAgentSignature, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MultiAgentSignature; + static deserializeBinaryFromReader(message: MultiAgentSignature, reader: jspb.BinaryReader): MultiAgentSignature; } export namespace MultiAgentSignature { - export type AsObject = { - sender?: AccountSignature.AsObject, - secondarySignerAddressesList: Array, - secondarySignersList: Array, - } -} - -export class AccountSignature extends jspb.Message { - getType(): AccountSignature.TypeMap[keyof AccountSignature.TypeMap]; - setType(value: AccountSignature.TypeMap[keyof AccountSignature.TypeMap]): void; - - hasEd25519(): boolean; - clearEd25519(): void; - getEd25519(): Ed25519Signature | undefined; - setEd25519(value?: Ed25519Signature): void; - - hasMultiEd25519(): boolean; - clearMultiEd25519(): void; - getMultiEd25519(): MultiEd25519Signature | undefined; - setMultiEd25519(value?: MultiEd25519Signature): void; - - getSignatureCase(): AccountSignature.SignatureCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AccountSignature.AsObject; - static toObject(includeInstance: boolean, msg: AccountSignature): AccountSignature.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AccountSignature, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AccountSignature; - static deserializeBinaryFromReader(message: AccountSignature, reader: jspb.BinaryReader): AccountSignature; + export type AsObject = { + sender?: AccountSignature.AsObject, + secondarySignerAddressesList: Array, + secondarySignersList: Array, + } +} + +export class AccountSignature extends jspb.Message { + getType(): AccountSignature.Type; + setType(value: AccountSignature.Type): AccountSignature; + + hasEd25519(): boolean; + clearEd25519(): void; + getEd25519(): Ed25519Signature | undefined; + setEd25519(value?: Ed25519Signature): AccountSignature; + + hasMultiEd25519(): boolean; + clearMultiEd25519(): void; + getMultiEd25519(): MultiEd25519Signature | undefined; + setMultiEd25519(value?: MultiEd25519Signature): AccountSignature; + + getSignatureCase(): AccountSignature.SignatureCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AccountSignature.AsObject; + static toObject(includeInstance: boolean, msg: AccountSignature): AccountSignature.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AccountSignature, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AccountSignature; + static deserializeBinaryFromReader(message: AccountSignature, reader: jspb.BinaryReader): AccountSignature; } export namespace AccountSignature { - export type AsObject = { - type: AccountSignature.TypeMap[keyof AccountSignature.TypeMap], - ed25519?: Ed25519Signature.AsObject, - multiEd25519?: MultiEd25519Signature.AsObject, - } - - export interface TypeMap { - TYPE_UNSPECIFIED: 0; - TYPE_ED25519: 1; - TYPE_MULTI_ED25519: 2; - } - - export const Type: TypeMap; - - export enum SignatureCase { - SIGNATURE_NOT_SET = 0, - ED25519 = 2, - MULTI_ED25519 = 3, - } -} - -export interface MoveTypesMap { - MOVE_TYPES_UNSPECIFIED: 0; - MOVE_TYPES_BOOL: 1; - MOVE_TYPES_U8: 2; - MOVE_TYPES_U16: 12; - MOVE_TYPES_U32: 13; - MOVE_TYPES_U64: 3; - MOVE_TYPES_U128: 4; - MOVE_TYPES_U256: 14; - MOVE_TYPES_ADDRESS: 5; - MOVE_TYPES_SIGNER: 6; - MOVE_TYPES_VECTOR: 7; - MOVE_TYPES_STRUCT: 8; - MOVE_TYPES_GENERIC_TYPE_PARAM: 9; - MOVE_TYPES_REFERENCE: 10; - MOVE_TYPES_UNPARSABLE: 11; -} - -export const MoveTypes: MoveTypesMap; - -export interface MoveAbilityMap { - MOVE_ABILITY_UNSPECIFIED: 0; - MOVE_ABILITY_COPY: 1; - MOVE_ABILITY_DROP: 2; - MOVE_ABILITY_STORE: 3; - MOVE_ABILITY_KEY: 4; -} - -export const MoveAbility: MoveAbilityMap; + export type AsObject = { + type: AccountSignature.Type, + ed25519?: Ed25519Signature.AsObject, + multiEd25519?: MultiEd25519Signature.AsObject, + } + + export enum Type { + TYPE_UNSPECIFIED = 0, + TYPE_ED25519 = 1, + TYPE_MULTI_ED25519 = 2, + } + + export enum SignatureCase { + SIGNATURE_NOT_SET = 0, + ED25519 = 2, + MULTI_ED25519 = 3, + } + +} + +export enum MoveTypes { + MOVE_TYPES_UNSPECIFIED = 0, + MOVE_TYPES_BOOL = 1, + MOVE_TYPES_U8 = 2, + MOVE_TYPES_U16 = 12, + MOVE_TYPES_U32 = 13, + MOVE_TYPES_U64 = 3, + MOVE_TYPES_U128 = 4, + MOVE_TYPES_U256 = 14, + MOVE_TYPES_ADDRESS = 5, + MOVE_TYPES_SIGNER = 6, + MOVE_TYPES_VECTOR = 7, + MOVE_TYPES_STRUCT = 8, + MOVE_TYPES_GENERIC_TYPE_PARAM = 9, + MOVE_TYPES_REFERENCE = 10, + MOVE_TYPES_UNPARSABLE = 11, +} + +export enum MoveAbility { + MOVE_ABILITY_UNSPECIFIED = 0, + MOVE_ABILITY_COPY = 1, + MOVE_ABILITY_DROP = 2, + MOVE_ABILITY_STORE = 3, + MOVE_ABILITY_KEY = 4, +} diff --git a/typescript/aptos/transaction/testing1/v1/transaction_pb.js b/typescript/aptos/transaction/testing1/v1/transaction_pb.js index 1236773cf..27f544ee5 100644 --- a/typescript/aptos/transaction/testing1/v1/transaction_pb.js +++ b/typescript/aptos/transaction/testing1/v1/transaction_pb.js @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); var aptos_util_timestamp_timestamp_pb = require('../../../../aptos/util/timestamp/timestamp_pb.js'); goog.object.extend(proto, aptos_util_timestamp_timestamp_pb); diff --git a/typescript/aptos/transaction/testing1/v1/transaction_pb_service.d.ts b/typescript/aptos/transaction/testing1/v1/transaction_pb_service.d.ts deleted file mode 100644 index f9ab9c2e8..000000000 --- a/typescript/aptos/transaction/testing1/v1/transaction_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: aptos.transaction.testing1.v1 -// file: aptos/transaction/testing1/v1/transaction.proto - diff --git a/typescript/aptos/transaction/testing1/v1/transaction_pb_service.js b/typescript/aptos/transaction/testing1/v1/transaction_pb_service.js deleted file mode 100644 index f9ab9c2e8..000000000 --- a/typescript/aptos/transaction/testing1/v1/transaction_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: aptos.transaction.testing1.v1 -// file: aptos/transaction/testing1/v1/transaction.proto - diff --git a/typescript/aptos/util/timestamp/timestamp_grpc_pb.js b/typescript/aptos/util/timestamp/timestamp_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/typescript/aptos/util/timestamp/timestamp_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/typescript/aptos/util/timestamp/timestamp_pb.d.ts b/typescript/aptos/util/timestamp/timestamp_pb.d.ts index 1dfa7e2c5..a7e578b46 100644 --- a/typescript/aptos/util/timestamp/timestamp_pb.d.ts +++ b/typescript/aptos/util/timestamp/timestamp_pb.d.ts @@ -1,29 +1,30 @@ // package: aptos.util.timestamp // file: aptos/util/timestamp/timestamp.proto -import * as jspb from "google-protobuf"; +/* tslint:disable */ +/* eslint-disable */ -export class Timestamp extends jspb.Message { - getSeconds(): number; - setSeconds(value: number): void; +import * as jspb from "google-protobuf"; - getNanos(): number; - setNanos(value: number): void; +export class Timestamp extends jspb.Message { + getSeconds(): number; + setSeconds(value: number): Timestamp; + getNanos(): number; + setNanos(value: number): Timestamp; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Timestamp.AsObject; - static toObject(includeInstance: boolean, msg: Timestamp): Timestamp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Timestamp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Timestamp; - static deserializeBinaryFromReader(message: Timestamp, reader: jspb.BinaryReader): Timestamp; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Timestamp.AsObject; + static toObject(includeInstance: boolean, msg: Timestamp): Timestamp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Timestamp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Timestamp; + static deserializeBinaryFromReader(message: Timestamp, reader: jspb.BinaryReader): Timestamp; } export namespace Timestamp { - export type AsObject = { - seconds: number, - nanos: number, - } + export type AsObject = { + seconds: number, + nanos: number, + } } - diff --git a/typescript/aptos/util/timestamp/timestamp_pb.js b/typescript/aptos/util/timestamp/timestamp_pb.js index 748732d4f..1495369d6 100644 --- a/typescript/aptos/util/timestamp/timestamp_pb.js +++ b/typescript/aptos/util/timestamp/timestamp_pb.js @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); goog.exportSymbol('proto.aptos.util.timestamp.Timestamp', null, global); /** diff --git a/typescript/aptos/util/timestamp/timestamp_pb_service.d.ts b/typescript/aptos/util/timestamp/timestamp_pb_service.d.ts deleted file mode 100644 index a8df300ac..000000000 --- a/typescript/aptos/util/timestamp/timestamp_pb_service.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// package: aptos.util.timestamp -// file: aptos/util/timestamp/timestamp.proto - diff --git a/typescript/aptos/util/timestamp/timestamp_pb_service.js b/typescript/aptos/util/timestamp/timestamp_pb_service.js deleted file mode 100644 index a8df300ac..000000000 --- a/typescript/aptos/util/timestamp/timestamp_pb_service.js +++ /dev/null @@ -1,3 +0,0 @@ -// package: aptos.util.timestamp -// file: aptos/util/timestamp/timestamp.proto - diff --git a/typescript/config.ts b/typescript/config.ts new file mode 100644 index 000000000..f75a24504 --- /dev/null +++ b/typescript/config.ts @@ -0,0 +1,20 @@ +import * as yaml from "js-yaml"; +import * as fs from "fs"; + +class Config { + constructor( + public chain_id: number, + public indexer_endpoint: string, + public indexer_api_key: string, + public starting_version: number, + public db_connection_uri: string, + public cursor_filename: string + ) {} + + public static from_yaml_file(path: string): Config { + const contents = fs.readFileSync(path, "utf8"); + return yaml.load(contents) as Config; + } +} + +export { Config }; diff --git a/typescript/config.yaml b/typescript/config.yaml new file mode 100644 index 000000000..2f06d5ed9 --- /dev/null +++ b/typescript/config.yaml @@ -0,0 +1,6 @@ +chain_id: 1 +indexer_endpoint: "34.30.218.153:50051" +indexer_api_key: "" +db_host: "" +db_port: "" +db_name: "" diff --git a/typescript/create_table.ts b/typescript/create_table.ts new file mode 100644 index 000000000..5f0a67472 --- /dev/null +++ b/typescript/create_table.ts @@ -0,0 +1,23 @@ +import "reflect-metadata"; +import { DataSource } from "typeorm"; + +const AppDataSource = new DataSource({ + type: "postgres", + host: "localhost", + port: 5432, + username: "root", + password: "admin", + database: "test", + entities: [], + synchronize: true, + logging: false, +}); + +// to initialize initial connection with the database, register all entities +// and "synchronize" database schema, call "initialize()" method of a newly created database +// once in your application bootstrap +AppDataSource.initialize() + .then(() => { + // here you can start to work with your database + }) + .catch((error) => console.log(error)); diff --git a/typescript/entity/WriteSetChange.ts b/typescript/entity/WriteSetChange.ts new file mode 100644 index 000000000..db4a520c8 --- /dev/null +++ b/typescript/entity/WriteSetChange.ts @@ -0,0 +1,25 @@ +import { Entity, PrimaryColumn, Column } from "typeorm"; + +@Entity() +export class WriteSetChange { + @PrimaryColumn() + transactionVersion: number; + + @PrimaryColumn() + index: number; + + @Column() + stateKeyHash: string; + + @Column() + transactionBlockHeight: number; + + @Column() + type: string; + + @Column() + address: string; + + @Column("timestamp with time zone") + insertedAt: number; +} diff --git a/typescript/grpc_client.ts b/typescript/grpc_client.ts deleted file mode 100644 index d467c9cea..000000000 --- a/typescript/grpc_client.ts +++ /dev/null @@ -1 +0,0 @@ -import "@grpc/grpc-js"; diff --git a/typescript/grpc_parser.ts b/typescript/grpc_parser.ts index e69de29bb..2fcc3fe84 100644 --- a/typescript/grpc_parser.ts +++ b/typescript/grpc_parser.ts @@ -0,0 +1,74 @@ +import { + DeleteModule, + Transaction, + WriteSetChange, +} from "./aptos/transaction/testing1/v1/transaction_pb"; + +export function parse(transaction: Transaction): void { + // Custom filtering: Filter out all transactions that are not User Transactions + if ( + transaction.getType() != Transaction.TransactionType.TRANSACTION_TYPE_USER + ) { + return; + } + + // Parse Transaction object + const transactionVersion = transaction.getVersion(); + const transactionBlockHeight = transaction.getBlockHeight(); + const transactionInfo = transaction.getInfo(); + + if (transactionInfo == null) { + return; + } + + const writeSetChanges = transactionInfo.getChangesList(); + const parsedWriteSetChanges = []; + + // Parse WriteSetChanges + writeSetChanges.forEach(function (writeSetChange, index) { + const type = writeSetChange.getType(); + let address = ""; + let stateKeyHash = ""; + + switch (type) { + case WriteSetChange.Type.TYPE_DELETE_MODULE: + case WriteSetChange.Type.TYPE_DELETE_RESOURCE: + case WriteSetChange.Type.TYPE_WRITE_MODULE: + case WriteSetChange.Type.TYPE_WRITE_RESOURCE: + const change = + writeSetChange.getDeleteModule() || + writeSetChange.getDeleteResource() || + writeSetChange.getWriteModule() || + writeSetChange.getWriteResource(); + + if (change == null) { + return; + } + + address = change.getAddress(); + stateKeyHash = change.getStateKeyHash_asB64(); + break; + case WriteSetChange.Type.TYPE_DELETE_TABLE_ITEM: + case WriteSetChange.Type.TYPE_WRITE_TABLE_ITEM: + const tableItemChange = + writeSetChange.getDeleteTableItem() || + writeSetChange.getWriteTableItem(); + + if (tableItemChange == null) { + return; + } + stateKeyHash = tableItemChange.getStateKeyHash_asB64(); + break; + case WriteSetChange.Type.TYPE_UNSPECIFIED: + return; + } + // console.log( + // transactionVersion, + // transactionBlockHeight, + // type, + // address, + // stateKeyHash, + // index + // ); + }); +} diff --git a/typescript/index.ts b/typescript/index.ts new file mode 100644 index 000000000..254195165 --- /dev/null +++ b/typescript/index.ts @@ -0,0 +1,20 @@ +// import { AppDataSource } from "./data-source" +// import { User } from "./entity/User" + +// AppDataSource.initialize().then(async () => { + +// console.log("Inserting a new user into the database...") +// const user = new User() +// user.firstName = "Timber" +// user.lastName = "Saw" +// user.age = 25 +// await AppDataSource.manager.save(user) +// console.log("Saved a new user with id: " + user.id) + +// console.log("Loading users from the database...") +// const users = await AppDataSource.manager.find(User) +// console.log("Loaded users: ", users) + +// console.log("Here you can setup and run express / fastify / any other framework.") + +// }).catch(error => console.log(error)) diff --git a/typescript/package-lock.json b/typescript/package-lock.json new file mode 100644 index 000000000..94a3ae53f --- /dev/null +++ b/typescript/package-lock.json @@ -0,0 +1,2055 @@ +{ + "name": "typescript", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "hasInstallScript": true, + "dependencies": { + "@grpc/grpc-js": "^1.8.14", + "@types/argparse": "^2.0.10", + "@types/google-protobuf": "^3.15.6", + "@types/js-yaml": "^4.0.5", + "argparse": "^2.0.1", + "google-protobuf": "^3.21.2", + "js-yaml": "^4.1.0", + "patch-package": "^7.0.0", + "pg": "^8.4.0", + "reflect-metadata": "^0.1.13", + "timer-node": "^5.0.7", + "typeorm": "0.3.15" + }, + "devDependencies": { + "@types/node": "^18.15.11", + "grpc_tools_node_protoc_ts": "^5.3.3", + "grpc-tools": "^1.12.4", + "ts-node": "10.7.0", + "typescript": "4.5.2" + } + }, + "node_modules/@cspotcode/source-map-consumer": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", + "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", + "devOptional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", + "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "devOptional": true, + "dependencies": { + "@cspotcode/source-map-consumer": "0.8.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@grpc/grpc-js": { + "version": "1.8.14", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.14.tgz", + "integrity": "sha512-w84maJ6CKl5aApCMzFll0hxtFNT6or9WwMslobKaqWUEf1K+zhlL43bSQhFreyYWIWR+Z0xnVFC1KtLm4ZpM/A==", + "dependencies": { + "@grpc/proto-loader": "^0.7.0", + "@types/node": ">=12.12.47" + }, + "engines": { + "node": "^8.13.0 || >=10.10.0" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.6.tgz", + "integrity": "sha512-QyAXR8Hyh7uMDmveWxDSUcJr9NAWaZ2I6IXgAYvQmfflwouTM+rArE2eEaCtLlRqO81j7pRLCt81IefUei6Zbw==", + "dependencies": { + "@types/long": "^4.0.1", + "lodash.camelcase": "^4.3.0", + "long": "^4.0.0", + "protobufjs": "^7.0.0", + "yargs": "^16.2.0" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@mapbox/node-pre-gyp": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", + "integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==", + "dev": true, + "dependencies": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/detect-libc": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", + "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, + "node_modules/@sqltools/formatter": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.5.tgz", + "integrity": "sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==" + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "devOptional": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "devOptional": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "devOptional": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "devOptional": true + }, + "node_modules/@types/argparse": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-2.0.10.tgz", + "integrity": "sha512-C4wahC3gz3vQtvPazrJ5ONwmK1zSDllQboiWvpMM/iOswCYfBREFnjFbq/iWKIVOCl8+m5Pk6eva6/ZSsDuIGA==" + }, + "node_modules/@types/google-protobuf": { + "version": "3.15.6", + "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.15.6.tgz", + "integrity": "sha512-pYVNNJ+winC4aek+lZp93sIKxnXt5qMkuKmaqS3WGuTq0Bw1ZDYNBgzG5kkdtwcv+GmYJGo3yEg6z2cKKAiEdw==" + }, + "node_modules/@types/js-yaml": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.5.tgz", + "integrity": "sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA==" + }, + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, + "node_modules/@types/node": { + "version": "18.16.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.7.tgz", + "integrity": "sha512-MFg7ua/bRtnA1hYE3pVyWxGd/r7aMqjNOdHvlSsXV3n8iaeGKkOaPzpJh6/ovf4bEXWcojkeMJpTsq3mzXW4IQ==" + }, + "node_modules/@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==" + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "devOptional": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "devOptional": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" + }, + "node_modules/app-root-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz", + "integrity": "sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true + }, + "node_modules/are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "dev": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "devOptional": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-writer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", + "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-highlight": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.11.tgz", + "integrity": "sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==", + "dependencies": { + "chalk": "^4.0.0", + "highlight.js": "^10.7.1", + "mz": "^2.4.0", + "parse5": "^5.1.1", + "parse5-htmlparser2-tree-adapter": "^6.0.0", + "yargs": "^16.0.0" + }, + "bin": { + "highlight": "bin/highlight" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true, + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "dev": true + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "devOptional": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "dev": true + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "devOptional": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dotenv": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", + "engines": { + "node": ">=12" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "dependencies": { + "micromatch": "^4.0.2" + } + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "dev": true, + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/google-protobuf": { + "version": "3.21.2", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.2.tgz", + "integrity": "sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA==" + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/grpc_tools_node_protoc_ts": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-5.3.3.tgz", + "integrity": "sha512-M/YrklvVXMtuuj9kb42PxeouZhs7Ul+R4e/31XwrankUcKL8cQQP50Q9q+KEHGyHQaPt6VtKKsxMgLaKbCxeww==", + "dev": true, + "dependencies": { + "google-protobuf": "3.15.8", + "handlebars": "4.7.7" + }, + "bin": { + "protoc-gen-ts": "bin/protoc-gen-ts" + } + }, + "node_modules/grpc_tools_node_protoc_ts/node_modules/google-protobuf": { + "version": "3.15.8", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.15.8.tgz", + "integrity": "sha512-2jtfdqTaSxk0cuBJBtTTWsot4WtR9RVr2rXg7x7OoqiuOKopPrwXpM1G4dXIkLcUNRh3RKzz76C8IOkksZSeOw==", + "dev": true + }, + "node_modules/grpc-tools": { + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.12.4.tgz", + "integrity": "sha512-5+mLAJJma3BjnW/KQp6JBjUMgvu7Mu3dBvBPd1dcbNIb+qiR0817zDpgPjS7gRb+l/8EVNIa3cB02xI9JLToKg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@mapbox/node-pre-gyp": "^1.0.5" + }, + "bin": { + "grpc_tools_node_protoc": "bin/protoc.js", + "grpc_tools_node_protoc_plugin": "bin/protoc_plugin.js" + } + }, + "node_modules/handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "dev": true + }, + "node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "engines": { + "node": "*" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "dependencies": { + "graceful-fs": "^4.1.11" + } + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + }, + "node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "devOptional": true + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/node-fetch": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", + "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "dev": true, + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" + }, + "node_modules/parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==" + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "dependencies": { + "parse5": "^6.0.1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + }, + "node_modules/patch-package": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-7.0.0.tgz", + "integrity": "sha512-eYunHbnnB2ghjTNc5iL1Uo7TsGMuXk0vibX3RFcE/CdVdXzmdbMsG/4K4IgoSuIkLTI5oHrMQk4+NkFqSed0BQ==", + "dependencies": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cross-spawn": "^7.0.3", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^9.0.0", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.6", + "open": "^7.4.2", + "rimraf": "^2.6.3", + "semver": "^5.6.0", + "slash": "^2.0.0", + "tmp": "^0.0.33", + "yaml": "^2.2.2" + }, + "bin": { + "patch-package": "index.js" + }, + "engines": { + "node": ">=14", + "npm": ">5" + } + }, + "node_modules/patch-package/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/patch-package/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/pg": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.10.0.tgz", + "integrity": "sha512-ke7o7qSTMb47iwzOSaZMfeR7xToFdkE71ifIipOAAaLIM0DYzfOAXlgFFmYUIE2BcJtvnVlGCID84ZzCegE8CQ==", + "dependencies": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.5.0", + "pg-pool": "^3.6.0", + "pg-protocol": "^1.6.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "node_modules/pg-connection-string": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", + "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==" + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-pool": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.0.tgz", + "integrity": "sha512-clFRf2ksqd+F497kWFyM21tMjeikn60oGDmqMT8UBrynEwVEX/5R5xd2sdvdo1cZCFlguORNpVuqxIj+aK4cfQ==", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.0.tgz", + "integrity": "sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==" + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "dependencies": { + "split2": "^4.1.0" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/protobufjs": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.3.tgz", + "integrity": "sha512-TtpvOqwB5Gdz/PQmOjgsrGH1nHjAQVCN7JG4A6r1sXRWESL5rNMAiRcBQlCAdKxZcAbstExQePYG8xof/JVRgg==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/protobufjs/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", + "dev": true, + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^4.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/timer-node": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/timer-node/-/timer-node-5.0.7.tgz", + "integrity": "sha512-M1aP6ASmuVD0PSxl5fqjCAGY9WyND3DHZ8RwT5I8o7469XE53Lb5zbPai20Dhj7TProyaapfVj3TaT0P+LoSEA==" + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/ts-node": { + "version": "10.7.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", + "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", + "devOptional": true, + "dependencies": { + "@cspotcode/source-map-support": "0.7.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.0", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + }, + "node_modules/typeorm": { + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.3.15.tgz", + "integrity": "sha512-R4JSw8QjDP1W+ypeRz/XrCXIqubrLSnNAzJAp9EQSQIPHTv+YmUHZis8g08lOwFpuhqL9m8jkPSz8GWEKlU/ow==", + "dependencies": { + "@sqltools/formatter": "^1.2.5", + "app-root-path": "^3.1.0", + "buffer": "^6.0.3", + "chalk": "^4.1.2", + "cli-highlight": "^2.1.11", + "debug": "^4.3.4", + "dotenv": "^16.0.3", + "glob": "^8.1.0", + "mkdirp": "^2.1.3", + "reflect-metadata": "^0.1.13", + "sha.js": "^2.4.11", + "tslib": "^2.5.0", + "uuid": "^9.0.0", + "yargs": "^17.6.2" + }, + "bin": { + "typeorm": "cli.js", + "typeorm-ts-node-commonjs": "cli-ts-node-commonjs.js", + "typeorm-ts-node-esm": "cli-ts-node-esm.js" + }, + "engines": { + "node": ">= 12.9.0" + }, + "funding": { + "url": "https://opencollective.com/typeorm" + }, + "peerDependencies": { + "@google-cloud/spanner": "^5.18.0", + "@sap/hana-client": "^2.12.25", + "better-sqlite3": "^7.1.2 || ^8.0.0", + "hdb-pool": "^0.1.6", + "ioredis": "^5.0.4", + "mongodb": "^5.2.0", + "mssql": "^9.1.1", + "mysql2": "^2.2.5 || ^3.0.1", + "oracledb": "^5.1.0", + "pg": "^8.5.1", + "pg-native": "^3.0.0", + "pg-query-stream": "^4.0.0", + "redis": "^3.1.1 || ^4.0.0", + "sql.js": "^1.4.0", + "sqlite3": "^5.0.3", + "ts-node": "^10.7.0", + "typeorm-aurora-data-api-driver": "^2.0.0" + }, + "peerDependenciesMeta": { + "@google-cloud/spanner": { + "optional": true + }, + "@sap/hana-client": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "hdb-pool": { + "optional": true + }, + "ioredis": { + "optional": true + }, + "mongodb": { + "optional": true + }, + "mssql": { + "optional": true + }, + "mysql2": { + "optional": true + }, + "oracledb": { + "optional": true + }, + "pg": { + "optional": true + }, + "pg-native": { + "optional": true + }, + "pg-query-stream": { + "optional": true + }, + "redis": { + "optional": true + }, + "sql.js": { + "optional": true + }, + "sqlite3": { + "optional": true + }, + "ts-node": { + "optional": true + }, + "typeorm-aurora-data-api-driver": { + "optional": true + } + } + }, + "node_modules/typeorm/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/typeorm/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/typeorm/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typeorm/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/typeorm/node_modules/mkdirp": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz", + "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typeorm/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/typeorm/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, + "node_modules/typescript": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", + "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", + "devOptional": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "dev": true, + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "devOptional": true + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yaml": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz", + "integrity": "sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==", + "engines": { + "node": ">= 14" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "devOptional": true, + "engines": { + "node": ">=6" + } + } + } +} diff --git a/typescript/package.json b/typescript/package.json new file mode 100644 index 000000000..4436d283f --- /dev/null +++ b/typescript/package.json @@ -0,0 +1,27 @@ +{ + "dependencies": { + "@grpc/grpc-js": "1.8.14", + "@types/argparse": "^2.0.10", + "@types/google-protobuf": "^3.15.6", + "@types/js-yaml": "^4.0.5", + "argparse": "^2.0.1", + "google-protobuf": "^3.21.2", + "js-yaml": "^4.1.0", + "patch-package": "^7.0.0", + "pg": "^8.4.0", + "reflect-metadata": "^0.1.13", + "timer-node": "^5.0.7", + "typeorm": "0.3.15" + }, + "devDependencies": { + "@types/node": "^18.15.11", + "grpc_tools_node_protoc_ts": "^5.3.3", + "grpc-tools": "^1.12.4", + "ts-node": "10.7.0", + "typescript": "4.5.2" + }, + "scripts": { + "postinstall": "patch-package", + "build": "tsc -p tsconfig.json" + } +} diff --git a/typescript/patches/@grpc+grpc-js+1.8.14.patch b/typescript/patches/@grpc+grpc-js+1.8.14.patch new file mode 100644 index 000000000..1428b0bb9 --- /dev/null +++ b/typescript/patches/@grpc+grpc-js+1.8.14.patch @@ -0,0 +1,12 @@ +diff --git a/node_modules/@grpc/grpc-js/build/src/transport.js b/node_modules/@grpc/grpc-js/build/src/transport.js +index 1d861eb..fae5283 100644 +--- a/node_modules/@grpc/grpc-js/build/src/transport.js ++++ b/node_modules/@grpc/grpc-js/build/src/transport.js +@@ -505,6 +505,7 @@ class Http2SubchannelConnector { + this.session = session; + session.unref(); + session.once('connect', () => { ++ session.setLocalWindowSize(1024*1024); + session.removeAllListeners(); + resolve(new Http2Transport(session, address, options)); + this.session = null; diff --git a/typescript/processor.ts b/typescript/processor.ts new file mode 100644 index 000000000..1f9cb310a --- /dev/null +++ b/typescript/processor.ts @@ -0,0 +1,145 @@ +import { ArgumentParser } from 'argparse'; +import { parse } from './grpc_parser'; +import * as services from './aptos/indexer/v1/raw_data_grpc_pb'; +import * as indexerRawDataMessages from './aptos/indexer/v1/raw_data_pb'; +import { Config } from './config'; +import { Timer } from 'timer-node'; +import { exit } from 'process'; +import { ChannelCredentials, CallCredentials, Metadata } from '@grpc/grpc-js'; + +// A hack to override the http2 settings +class CustomChannelCred extends ChannelCredentials { + constructor(callCredentials?: CallCredentials) { + super(); + } + + compose(callCredentials: CallCredentials): never { + throw new Error('Cannot compose insecure credentials'); + } + + _getConnectionOptions(): any { + return { + settings: { + // This will increase the http2 frame size. Default is 16384, which is too small. + maxFrameSize: 4194304, + // The initial window size is overridden. We need to patch the grpc-js library to allow this. + initialWindowSize: 4194304, + maxHeaderListSize: 8192, + enablePush: false, + maxConcurrentStreams: 0, + }, + }; + } + + _isSecure(): boolean { + return false; + } + + _equals(other: ChannelCredentials): boolean { + return other instanceof CustomChannelCred; + } +} + +// Parse the config file +const parser = new ArgumentParser({ + description: 'Indexer Stream Client arguments', +}); +parser.add_argument('-c', '--config', { + help: 'Path to config file', + required: true, +}); +parser.add_argument('-p', '--perf', { + help: 'Show performance metrics. Takes one value: number of transactions to process e.g. -p 1000', + required: false, +}); +const args = parser.parse_args(); +const config = Config.from_yaml_file(args.config); + +// Create client and request +const client = new services.RawDataClient( + config.indexer_endpoint, + new CustomChannelCred(), + { + 'grpc.keepalive_time_ms': 1000, + 'grpc.default_compression_algorithm': 2, + 'grpc.default_compression_level': 3, + 'grpc.max_receive_message_length': -1, + 'grpc.max_send_message_length': -1, + } +); + +const request = new indexerRawDataMessages.GetTransactionsRequest(); +request.setStartingVersion(config.starting_version); +const metadata = new Metadata(); +metadata.set('x-aptos-data-authorization', config.indexer_api_key); + +// Create and start the streaming RPC +let currentTransactionVersion = config.starting_version; +const stream = client.getTransactions(request, metadata); + +const timer = new Timer(); +timer.start(); + +stream.on( + 'data', + function (response: indexerRawDataMessages.TransactionsResponse) { + const transactionsList = response.getTransactionsList(); + + if (transactionsList == null) { + return; + } + + // Validate response chain ID matches expected chain ID + if (response.getChainId() != config.chain_id) { + throw new Error( + `Chain ID mismatch. Expected ${ + config.chain_id + } but got ${response.getChainId()}` + ); + } + + if (transactionsList == null) { + return; + } + + for (const transaction of transactionsList) { + // Validate transaction version is correct + if (transaction.getVersion() != currentTransactionVersion) { + throw new Error( + `Transaction version mismatch. Expected ${currentTransactionVersion} but got ${transaction.getVersion()}` + ); + } + + parse(transaction); + + if (currentTransactionVersion % 1000 == 0) { + console.log({ + message: 'Successfully processed transaction', + last_success_transaction_version: currentTransactionVersion, + }); + } + + const totalTransactions = + currentTransactionVersion - config.starting_version + 1; + + if (args.perf && totalTransactions >= args.perf) { + timer.stop(); + console.log( + `Takes ${timer.ms()} ms to receive ${totalTransactions} txns` + ); + exit(0); + } + + currentTransactionVersion += 1; + } + } +); + +stream.on('error', function (e) { + console.log(e); + // An error has occurred and the stream has been closed. +}); +stream.on('status', function (status) { + console.log(status); + // process status +}); diff --git a/typescript/tsconfig.json b/typescript/tsconfig.json new file mode 100644 index 000000000..0a8f3958a --- /dev/null +++ b/typescript/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "lib": ["es5", "es6"], + "target": "ES2021", + "module": "commonjs", + "moduleResolution": "node", + "outDir": "./build", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "sourceMap": true + }, + "include": [ + "**/*.ts", + ] +} diff --git a/typescript/typescript/.gitignore b/typescript/typescript/.gitignore new file mode 100644 index 000000000..b3ab1ae41 --- /dev/null +++ b/typescript/typescript/.gitignore @@ -0,0 +1,6 @@ +.idea/ +.vscode/ +node_modules/ +build/ +tmp/ +temp/ \ No newline at end of file diff --git a/typescript/typescript/README.md b/typescript/typescript/README.md new file mode 100644 index 000000000..0fdaaf888 --- /dev/null +++ b/typescript/typescript/README.md @@ -0,0 +1,7 @@ +# Awesome Project Build with TypeORM + +Steps to run this project: + +1. Run `npm i` command +2. Setup database settings inside `data-source.ts` file +3. Run `npm start` command