diff --git a/.env.custom_node b/.env.custom_node index 194db3ae..af601b8a 100644 --- a/.env.custom_node +++ b/.env.custom_node @@ -7,4 +7,4 @@ NODE_TIMEOUT=30000 # Time after which the tests would fail if the mirror node do MIRROR_NETWORK=127.0.0.1:5600 MIRROR_NODE_REST_URL=http://127.0.0.1:5551 MIRROR_NODE_REST_JAVA_URL=http://127.0.0.1:8084 -JSON_RPC_SERVER_URL="http://localhost:8545/" \ No newline at end of file +JSON_RPC_SERVER_URL="http://localhost:8544/" \ No newline at end of file diff --git a/.env.testnet b/.env.testnet index a1768818..577cb32f 100644 --- a/.env.testnet +++ b/.env.testnet @@ -4,4 +4,4 @@ OPERATOR_ACCOUNT_PRIVATE_KEY=*** NODE_TIMEOUT=30000 # Time after which the tests would fail if the mirror node does not have the data MIRROR_NODE_REST_URL=https://testnet.mirrornode.hedera.com MIRROR_NODE_REST_JAVA_URL=https://testnet.mirrornode.hedera.com -JSON_RPC_SERVER_URL="http://localhost:8545/" \ No newline at end of file +JSON_RPC_SERVER_URL="http://localhost:8544/" \ No newline at end of file diff --git a/README.md b/README.md index 48411bd9..f7974dc5 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ In near future hedera-local-node will be transfered to Hiero (see our [transitio Start only the JSON-RPC server for the SDK you want to test. The JSON-RPC server for the specified SDK will parse the JSON formatted request received by the test driver. The JSON-RPC server will execute the corresponding function or procedure associated with that method and prepare the response in JSON format to send back to the test driver. -By default, the TCK will look for a JSON-RPC Server at: `http://localhost:8545/`, but this can be configured by changing the `JSON_RPC_SERVER_URL` in your `.env` file: +By default, the TCK will look for a JSON-RPC Server at: `http://localhost:8544/`, but this can be configured by changing the `JSON_RPC_SERVER_URL` in your `.env` file: ### Install and run @@ -76,12 +76,49 @@ To **format** the code run: npm run format ``` +### OpenAPI Model Generation + +The TCK uses OpenAPI model generation to create TypeScript interfaces and types from the `Hiero Mirror Node API` specification. This allows for type-safe interaction with the Mirror Node API and provides better development experience with autocompletion and type checking. + +The OpenAPI specification is defined in `mirror-node.yaml` and contains the complete API schema, including: +- API endpoints and their paths +- Request/response structures +- Data types and models +- Query parameters +- Authentication methods + +#### Generation Process + +1. Generate the TypeScript models: +```bash +npm run generate-mirror-node-models +``` + +2. Clean up and reorganize the generated files: +```bash +task cleanup-generated-mirror-node-models +``` + +The cleanup task (defined in `Taskfile.yaml`) performs the following: +- Removes unnecessary `core` and `services` directories +- Flattens the directory structure by moving files from `models/` to the root +- Updates import paths in `index.ts` to reflect the new structure + +### You can also run both steps together using (*recommended*): +```bash +task generate-mirror-node-models +``` + +This command uses `openapi-typescript-codegen` to parse the `mirror-node.yaml` file and generate corresponding TypeScript models in `src/utils/models/mirror-node-models` + + ## Contributing Whether you’re fixing bugs, enhancing features, or improving documentation, your contributions are important — let’s build something great together! Please read our [contributing guide](https://github.com/hiero-ledger/.github/blob/main/CONTRIBUTING.md) to see how you can get involved. + ## Code of Conduct Hiero uses the Linux Foundation Decentralised Trust [Code of Conduct](https://www.lfdecentralizedtrust.org/code-of-conduct). diff --git a/Taskfile.yaml b/Taskfile.yaml new file mode 100644 index 00000000..7409760f --- /dev/null +++ b/Taskfile.yaml @@ -0,0 +1,35 @@ +version: "3" + +tasks: + cleanup-generated-mirror-node-models: + desc: Cleans up generated OpenAPI files and reorganizes the structure + cmds: + # Remove core and services directories + - rm -rf src/utils/models/mirror-node-models/core + - rm -rf src/utils/models/mirror-node-models/services + + # Move all files from models directory to mirror-node-models + - mv src/utils/models/mirror-node-models/models/* src/utils/models/mirror-node-models/ + + # Remove the now-empty models directory + - rm -rf src/utils/models/mirror-node-models/models + + # Update index.ts using Node.js + - node -e " + const fs = require('fs'); + const path = 'src/utils/models/mirror-node-models/index.ts'; + let content = fs.readFileSync(path, 'utf8'); + content = content.split('\n') + .filter(line => !line.includes('/core/') && !line.includes('/services/')) + .map(line => line.replace('./models/', './')) + .join('\n'); + fs.writeFileSync(path, content); + " + status: + - test ! -d src/utils/models/mirror-node-models + + generate-mirror-node-models: + desc: Generates OpenAPI models and cleans up the structure + cmds: + - npm run generate-mirror-node-models + - task: cleanup-generated-mirror-node-models diff --git a/mirror-node.yaml b/mirror-node.yaml new file mode 100644 index 00000000..cdd7263f --- /dev/null +++ b/mirror-node.yaml @@ -0,0 +1,5169 @@ +openapi: 3.0.3 +paths: + /api/v1/accounts: + get: + summary: List account entities on network + description: Returns a list of all account entity items on the network. + operationId: getAccounts + parameters: + - $ref: "#/components/parameters/accountBalanceQueryParam" + - $ref: "#/components/parameters/accountIdQueryParam" + - $ref: "#/components/parameters/accountPublicKeyQueryParam" + - $ref: "#/components/parameters/balanceQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/AccountsResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + tags: + - accounts + /api/v1/accounts/{idOrAliasOrEvmAddress}: + get: + summary: Get account by alias, id, or evm address + description: | + Return the account transactions and balance information given an account alias, an account id, or an evm address. The information will be limited to at most 1000 token balances for the account as outlined in HIP-367. + When the timestamp parameter is supplied, we will return transactions and account state for the relevant timestamp query. Balance information will be accurate to within 15 minutes of the provided timestamp query. + Historical ethereum nonce information is currently not available and may not be the exact value at a provided timestamp. + operationId: getAccount + parameters: + - $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + - $ref: "#/components/parameters/timestampQueryParam" + - $ref: "#/components/parameters/transactionTypeQueryParam" + - $ref: "#/components/parameters/transactionsQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/AccountBalanceTransactions" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - accounts + /api/v1/accounts/{idOrAliasOrEvmAddress}/nfts: + get: + summary: Get nfts for an account info + description: | + Returns information for all non-fungible tokens for an account. + + ## Ordering + When considering NFTs, their order is governed by a combination of their numerical **token.Id** and **serialnumber** values, with **token.id** being the parent column. + A serialnumbers value governs its order within the given token.id + + In that regard, if a user acquired a set of NFTs in the order (2-2, 2-4 1-5, 1-1, 1-3, 3-3, 3-4), the following layouts illustrate the ordering expectations for ownership listing + 1. **All NFTs in ASC order**: 1-1, 1-3, 1-5, 2-2, 2-4, 3-3, 3-4 + 2. **All NFTs in DESC order**: 3-4, 3-3, 2-4, 2-2, 1-5, 1-3, 1-1 + 3. **NFTs above 1-1 in ASC order**: 1-3, 1-5, 2-2, 2-4, 3-3, 3-4 + 4. **NFTs below 3-3 in ASC order**: 1-1, 1-3, 1-5, 2-2, 2-4 + 5. **NFTs between 1-3 and 3-3 inclusive in DESC order**: 3-4, 3-3, 2-4, 2-2, 1-5, 1-3 + + Note: The default order for this API is currently DESC + + ## Filtering + When filtering there are some restrictions enforced to ensure correctness and scalability. + + **The table below defines the restrictions and support for the NFT ownership endpoint** + + | Query Param | Comparison Operator | Support | Description | Example | + | ------------- | ------------------- | ------- | --------------------- | ------- | + | token.id | eq | Y | Single occurrence only. | ?token.id=X | + | | ne | N | | | + | | lt(e) | Y | Single occurrence only. | ?token.id=lte:X | + | | gt(e) | Y | Single occurrence only. | ?token.id=gte:X | + | serialnumber | eq | Y | Single occurrence only. Requires the presence of a **token.id** query | ?serialnumber=Y | + | | ne | N | | | + | | lt(e) | Y | Single occurrence only. Requires the presence of an **lte** or **eq** **token.id** query | ?token.id=lte:X&serialnumber=lt:Y | + | | gt(e) | Y | Single occurrence only. Requires the presence of an **gte** or **eq** **token.id** query | ?token.id=gte:X&serialnumber=gt:Y | + | spender.id | eq | Y | | ?spender.id=Z | + | | ne | N | | | + | | lt(e) | Y | | ?spender.id=lt:Z | + | | gt(e) | Y | | ?spender.id=gt:Z | + + Note: When searching across a range for individual NFTs a **serialnumber** with an additional **token.id** query filter must be provided. + Both filters must be a single occurrence of **gt(e)** or **lt(e)** which provide a lower and or upper boundary for search. + + operationId: getNftsByAccountId + parameters: + - $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + - $ref: "#/components/parameters/serialNumberQueryParam" + - $ref: "#/components/parameters/spenderIdQueryParam" + - $ref: "#/components/parameters/tokenIdQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Nfts" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - accounts + /api/v1/accounts/{idOrAliasOrEvmAddress}/rewards: + get: + summary: Get past staking reward payouts for an account + description: | + Returns information for all past staking reward payouts for an account. + operationId: getStakingRewards + parameters: + - $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + - $ref: "#/components/parameters/timestampQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/StakingRewardsResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - accounts + /api/v1/accounts/{idOrAliasOrEvmAddress}/tokens: + get: + summary: Get token relationships info for an account + description: | + Returns information for all token relationships for an account. + operationId: getTokensByAccountId + parameters: + - $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParam" + - $ref: "#/components/parameters/tokenIdQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/TokenRelationshipResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - accounts + /api/v1/accounts/{idOrAliasOrEvmAddress}/airdrops/outstanding: + get: + summary: Get outstanding token airdrops sent by an account + description: | + Returns outstanding token airdrops that have been sent by an account. + operationId: getOutstandingTokenAirdrops + parameters: + - $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParam" + - $ref: "#/components/parameters/receiverIdQueryParam" + - $ref: "#/components/parameters/serialNumberQueryParam" + - $ref: "#/components/parameters/tokenIdQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/TokenAirdropsResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - airdrops + /api/v1/accounts/{idOrAliasOrEvmAddress}/airdrops/pending: + get: + summary: Get pending token airdrops received by an account + description: | + Returns pending token airdrops that have been received by an account. + operationId: getPendingTokenAirdrops + parameters: + - $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParam" + - $ref: "#/components/parameters/senderIdQueryParam" + - $ref: "#/components/parameters/serialNumberQueryParam" + - $ref: "#/components/parameters/tokenIdQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/TokenAirdropsResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - airdrops + /api/v1/accounts/{idOrAliasOrEvmAddress}/allowances/crypto: + get: + summary: Get crypto allowances for an account info + description: Returns information for all crypto allowances for an account. + operationId: getCryptoAllowances + parameters: + - $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + - $ref: "#/components/parameters/spenderIdQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/CryptoAllowancesResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - accounts + /api/v1/accounts/{idOrAliasOrEvmAddress}/allowances/tokens: + get: + summary: Get fungible token allowances for an account + description: | + Returns information for fungible token allowances for an account. + + ## Ordering + The order is governed by a combination of the spender id and the token id values, with spender id being the parent column. + The token id value governs its order within the given spender id. + + Note: The default order for this API is currently ASC + + ## Filtering + When filtering there are some restrictions enforced to ensure correctness and scalability. + + **The table below defines the restrictions and support for the endpoint** + + | Query Param | Comparison Operator | Support | Description | Example | + | ------------- | ------------------- | ------- | --------------------- | ------- | + | spender.id | eq | Y | Single occurrence only. | ?spender.id=X | + | | ne | N | | | + | | lt(e) | Y | Single occurrence only. | ?spender.id=lte:X | + | | gt(e) | Y | Single occurrence only. | ?spender.id=gte:X | + | token.id | eq | Y | Single occurrence only. Requires the presence of a **spender.id** query | ?token.id=lt:Y | + | | ne | N | | | + | | lt(e) | Y | Single occurrence only. Requires the presence of an **lte** or **eq** **spender.id** query | ?spender.id=lte:X&token.id=lt:Y | + | | gt(e) | Y | Single occurrence only. Requires the presence of an **gte** or **eq** **spender.id** query | ?spender.id=gte:X&token.id=gt:Y | + + Both filters must be a single occurrence of **gt(e)** or **lt(e)** which provide a lower and or upper boundary for search. + + operationId: getTokenAllowances + parameters: + - $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParam" + - $ref: "#/components/parameters/spenderIdQueryParam" + - $ref: "#/components/parameters/tokenIdQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/TokenAllowancesResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - accounts + /api/v1/accounts/{idOrAliasOrEvmAddress}/allowances/nfts: + get: + summary: Get non fungible token allowances for an account + description: | + Returns an account's non-fungible token allowances. + + ## Ordering + The order is governed by a combination of the account ID and the token ID values, with account ID being the parent column. + The token ID value governs its order within the given account ID. + + Note: The default order for this API is currently ascending. The account ID can be the owner or the spender ID depending upon the owner flag. + + ## Filtering + When filtering there are some restrictions enforced to ensure correctness and scalability. + + **The table below defines the restrictions and support for the endpoint** + + | Query Param | Comparison Operator | Support | Description | Example | + | ------------- | ------------------- | ------- | --------------------- | ------- | + | account.id | eq | Y | Single occurrence only. | ?account.id=X | + | | ne | N | | | + | | lt(e) | Y | Single occurrence only. | ?account.id=lte:X | + | | gt(e) | Y | Single occurrence only. | ?account.id=gte:X | + | token.id | eq | Y | Single occurrence only. Requires the presence of an **account.id** parameter | ?account.id=X&token.id=eq:Y | + | | ne | N | | | + | | lt(e) | Y | Single occurrence only. Requires the presence of an **lte** or **eq** **account.id** parameter | ?account.id=lte:X&token.id=lt:Y | + | | gt(e) | Y | Single occurrence only. Requires the presence of an **gte** or **eq** **account.id** parameter | ?account.id=gte:X&token.id=gt:Y | + + Both filters must be a single occurrence of **gt(e)** or **lt(e)** which provide a lower and or upper boundary for search. + + operationId: getNftAllowances + parameters: + - $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressPathParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParam" + - $ref: "#/components/parameters/accountIdQueryParam" + - $ref: "#/components/parameters/tokenIdQueryParam" + - $ref: "#/components/parameters/ownerQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/NftAllowancesResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - accounts + /api/v1/balances: + get: + summary: List account balances + description: + Returns a list of account and token balances on the network. Balance information returned by this API has a 15 + minute granularity as it's generated by an asynchronous balance snapshot process. This information is limited to + at most 50 token balances per account as outlined in HIP-367. As such, it's not recommended for general use and + we instead recommend using either `/api/v1/accounts/{id}/tokens` or `/api/v1/tokens/{id}/balances` to obtain + the current token balance information and `/api/v1/accounts/{id}` to return the current account balance. + operationId: getBalances + parameters: + - $ref: "#/components/parameters/accountIdOrAliasOrEvmAddressQueryParam" + - $ref: "#/components/parameters/accountBalanceQueryParam" + - $ref: "#/components/parameters/accountPublicKeyQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + - $ref: "#/components/parameters/timestampQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/BalancesResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + tags: + - balances + /api/v1/blocks: + get: + summary: List blocks + description: Returns a list of blocks on the network. + operationId: getBlocks + parameters: + - $ref: "#/components/parameters/blockNumberQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + - $ref: "#/components/parameters/timestampQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/BlocksResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + tags: + - blocks + /api/v1/blocks/{hashOrNumber}: + get: + summary: Get block by hash or number + description: Returns the block information by given hash or number. + operationId: getBlock + parameters: + - $ref: "#/components/parameters/hashOrNumberPathParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Block" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - blocks + /api/v1/contracts/call: + post: + summary: Invoke a smart contract + description: + Returns a result from EVM execution such as cost-free execution of read-only smart contract queries, gas estimation, and transient simulation of read-write operations. If the `estimate` field is set to true gas estimation is executed. However, gas estimation only supports the `latest` block. + When `estimate` is false, it can process calls against the `earliest` block and specific historical blocks when a hexadecimal or decimal block number is provided in the `block` field for `eth_call` operations. + [Link to Supported/Unsupported Operations Table](https://github.com/hashgraph/hedera-mirror-node/blob/main/docs/web3/README.md#supported/unsupported-operations) + + The operations types which are not currently supported should return 501 error status. + + operationId: contractCall + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ContractCallRequest" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ContractCallResponse" + 400: + description: Validation error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 404: + description: Not found error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 415: + description: Unsupported media type error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 429: + description: Too many requests + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 500: + description: Generic error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 501: + description: Not implemented error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + tags: + - contracts + /api/v1/contracts: + get: + summary: List contract entities on network + description: Returns a list of all contract entity items on the network. + operationId: getContracts + parameters: + - $ref: "#/components/parameters/contractIdQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ContractsResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + tags: + - contracts + /api/v1/contracts/{contractIdOrAddress}: + get: + summary: Get contract by id + description: Return the contract information given an id + operationId: getContract + parameters: + - $ref: "#/components/parameters/contractIdOrAddressPathParam" + - $ref: "#/components/parameters/timestampQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ContractResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - contracts + /api/v1/contracts/{contractIdOrAddress}/results: + get: + summary: List contract results from a contract on the network + description: Returns a list of all ContractResults for a contract's function executions. + operationId: getContractResultsByContractId + parameters: + - $ref: "#/components/parameters/contractIdOrAddressPathParam" + - $ref: "#/components/parameters/blockHashQueryParam" + - $ref: "#/components/parameters/contractsBlockNumberQueryParam" + - $ref: "#/components/parameters/fromQueryParam" + - $ref: "#/components/parameters/internalQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + - $ref: "#/components/parameters/timestampQueryParam" + - $ref: "#/components/parameters/transactionIndexQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ContractResultsResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - contracts + /api/v1/contracts/{contractIdOrAddress}/state: + get: + summary: The contract state from a contract on the network + description: Returns a list of all contract's slots. If no timestamp is provided, returns the current state. + operationId: getContractState + parameters: + - $ref: "#/components/parameters/contractIdOrAddressPathParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParam" + - $ref: "#/components/parameters/slotQueryParam" + - $ref: "#/components/parameters/stateTimestampQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ContractStateResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - contracts + /api/v1/contracts/{contractIdOrAddress}/results/{timestamp}: + get: + summary: Get the contract result from a contract on the network executed at a given timestamp + description: Returns a single ContractResult for a contract's function executions at a specific timestamp. + operationId: getContractResultByIdAndTimestamp + parameters: + - $ref: "#/components/parameters/contractIdOrAddressPathParam" + - $ref: "#/components/parameters/timestampPathParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ContractResultDetails" + 206: + description: Partial Content + content: + application/json: + schema: + $ref: "#/components/schemas/ContractResultDetails" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - contracts + /api/v1/contracts/results: + get: + summary: List contract results from all contracts on the network + description: Returns a list of all ContractResults for all contract's function executions. + operationId: getContractsResults + parameters: + - $ref: "#/components/parameters/fromQueryParam" + - $ref: "#/components/parameters/blockHashQueryParam" + - $ref: "#/components/parameters/contractsBlockNumberQueryParam" + - $ref: "#/components/parameters/internalQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + - $ref: "#/components/parameters/timestampQueryParam" + - $ref: "#/components/parameters/transactionIndexQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ContractResultsResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + tags: + - contracts + /api/v1/contracts/results/{transactionIdOrHash}: + get: + summary: Get the contract result from a contract on the network for a given transactionId or ethereum transaction hash + description: Returns a single ContractResult for a contract's function executions for a given transactionId or ethereum transaction hash. + operationId: getContractResultByTransactionIdOrHash + parameters: + - $ref: "#/components/parameters/transactionIdOrEthHashPathParam" + - $ref: "#/components/parameters/nonceQueryParamWithDefault" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ContractResultDetails" + 206: + description: Partial Content + content: + application/json: + schema: + $ref: "#/components/schemas/ContractResultDetails" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - contracts + /api/v1/contracts/results/{transactionIdOrHash}/actions: + get: + summary: Get the contract actions from a contract on the network for a given transactionId or ethereum transaction hash + description: Returns a list of ContractActions for a contract's function executions for a given transactionId or ethereum transaction hash. + operationId: getContractActions + parameters: + - $ref: "#/components/parameters/transactionIdOrEthHashPathParam" + - $ref: "#/components/parameters/contractActionsIndexQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ContractActionsResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - contracts + /api/v1/contracts/results/{transactionIdOrHash}/opcodes: + get: + summary: Get the opcode traces for a historical transaction on the network with the given transaction ID or hash + description: | + Re-executes a transaction and returns a result containing detailed information for the execution, + including all values from the {@code stack}, {@code memory} and {@code storage} + and the entire trace of opcodes that were executed during the replay. + + Note that to provide the output, the transaction needs to be re-executed on the EVM, + which may take a significant amount of time to complete if stack and memory information is requested. + operationId: getContractOpcodes + parameters: + - $ref: "#/components/parameters/transactionIdOrEthHashPathParam" + - $ref: "#/components/parameters/stack" + - $ref: "#/components/parameters/memory" + - $ref: "#/components/parameters/storage" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/OpcodesResponse" + 400: + description: Validation error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 404: + description: Transaction or record file not found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 429: + description: Too many requests + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + tags: + - contracts + /api/v1/contracts/{contractIdOrAddress}/results/logs: + get: + summary: List contract logs from a contract on the network + description: | + Search the logs of a specific contract across multiple contract calls. Chained logs are not + included but can be found by calling `/api/v1/contracts/{contractId}/results/{timestamp}` + or `/api/v1/contracts/results/{transactionId}`. When searching by topic a timestamp parameter must be supplied + and span a time range of at most seven days. + + ## Ordering + The order is governed by the combination of timestamp and index values. If the index param is omitted, the order is determined by the timestamp only. + + Note: The default order for this API is currently DESC + + ## Filtering + When filtering there are some restrictions enforced to ensure correctness and scalability. + + **The table below defines the restrictions and support for the endpoint** + + | Query Param | Comparison Operator | Support | Description | Example | + | ------------- | ------------------- | ------- | --------------------- | ------- | + | index | eq | Y | Single occurrence only. Requires the presence of timestamp | ?index=X | + | | ne | N | | | + | | lt(e) | Y | Single occurrence only. Requires the presence of timestamp | ?index=lte:X | + | | gt(e) | Y | Single occurrence only. Requires the presence of timestamp | ?index=gte:X | + | timestamp | eq | Y | Single occurrence only. | ?timestamp=Y + | | ne | N | | | + | | lt(e) | Y | Single occurrence only. Optional second timestamp **gt(e)** | ?timestamp=lte:Y + | | gt(e) | Y | Single occurrence only. Optional second timestamp **lt(e)** | ?timestamp=gte:Y + + + Both filters must be a single occurrence of **gt(e)** or **lt(e)** which provide a lower and or upper boundary for search. + + operationId: getContractLogsByContractId + parameters: + - $ref: "#/components/parameters/contractIdOrAddressPathParam" + - $ref: "#/components/parameters/logIndexQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + - $ref: "#/components/parameters/timestampQueryParam" + - $ref: "#/components/parameters/logTopic0QueryParam" + - $ref: "#/components/parameters/logTopic1QueryParam" + - $ref: "#/components/parameters/logTopic2QueryParam" + - $ref: "#/components/parameters/logTopic3QueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ContractLogsResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - contracts + /api/v1/contracts/results/logs: + get: + summary: List contracts logs across many contracts on the network + description: | + Search the logs across many contracts with multiple contract calls. Chained logs are not + included but can be found by calling `/api/v1/contracts/{contractId}/results/{timestamp}` + or `/api/v1/contracts/results/{transactionId}`. When searching by topic a timestamp parameter must be supplied + and span a time range of at most seven days. + + ## Ordering + The order is governed by the combination of timestamp and index values. If the index param is omitted, the order is determined by the timestamp only. + + Note: The default order for this API is currently DESC + + ## Filtering + When filtering there are some restrictions enforced to ensure correctness and scalability. + + **The table below defines the restrictions and support for the endpoint** + + | Query Param | Comparison Operator | Support | Description | Example | + | ------------- | ------------------- | ------- | --------------------- | ------- | + | index | eq | Y | Single occurrence only. Requires the presence of timestamp | ?index=X | + | | ne | N | | | + | | lt(e) | Y | Single occurrence only. Requires the presence of timestamp | ?index=lte:X | + | | gt(e) | Y | Single occurrence only. Requires the presence of timestamp | ?index=gte:X | + | timestamp | eq | Y | Single occurrence only. | ?timestamp=Y + | | ne | N | | | + | | lt(e) | Y | Single occurrence only. Optional second timestamp **gt(e)** | ?timestamp=lte:Y + | | gt(e) | Y | Single occurrence only. Optional second timestamp **lt(e)** | ?timestamp=gte:Y + + + Both filters must be a single occurrence of **gt(e)** or **lt(e)** which provide a lower and or upper boundary for search. + operationId: getContractsLogs + parameters: + - $ref: "#/components/parameters/logIndexQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + - $ref: "#/components/parameters/timestampQueryParam" + - $ref: "#/components/parameters/logTopic0QueryParam" + - $ref: "#/components/parameters/logTopic1QueryParam" + - $ref: "#/components/parameters/logTopic2QueryParam" + - $ref: "#/components/parameters/logTopic3QueryParam" + - $ref: "#/components/parameters/transactionHashQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ContractLogsResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + tags: + - contracts + /api/v1/network/exchangerate: + get: + summary: Get the network exchange rate to estimate costs + description: Returns the network's exchange rate, current and next. + operationId: getNetworkExchangeRate + parameters: + - $ref: "#/components/parameters/timestampQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/NetworkExchangeRateSetResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + 500: + $ref: "#/components/responses/ServiceUnavailableError" + tags: + - network + /api/v1/network/fees: + get: + summary: Get the network fees + description: Returns the estimated gas in tinybars per each transaction type. Default order is ASC. Currently only `ContractCall`, `ContractCreate` and `EthereumTransaction` transaction types are supported. + operationId: getNetworkFees + parameters: + - $ref: "#/components/parameters/orderQueryParam" + - $ref: "#/components/parameters/timestampQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/NetworkFeesResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + 500: + $ref: "#/components/responses/ServiceUnavailableError" + tags: + - network + /api/v1/network/nodes: + get: + summary: Get the network address book nodes + description: Returns the network's list of nodes used in consensus + operationId: getNetworkNodes + parameters: + - $ref: "#/components/parameters/fileIdQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/nodeIdQueryParam" + - $ref: "#/components/parameters/orderQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/NetworkNodesResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + tags: + - network + /api/v1/network/stake: + get: + summary: Get network stake information + description: Returns the network's current stake information. + operationId: getNetworkStake + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/NetworkStakeResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + 500: + $ref: "#/components/responses/ServiceUnavailableError" + tags: + - network + /api/v1/network/supply: + get: + summary: Get the network supply + description: Returns the network's released supply of hbars + operationId: getNetworkSupply + parameters: + - $ref: "#/components/parameters/timestampQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/NetworkSupplyResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - network + /api/v1/schedules: + get: + summary: List schedules entities + description: Lists schedules on the network that govern the execution logic of scheduled transactions. This includes executed and non executed schedules. + operationId: getSchedules + parameters: + - $ref: "#/components/parameters/accountIdQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParam" + - $ref: "#/components/parameters/scheduleIdQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/SchedulesResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + tags: + - schedules + /api/v1/schedules/{scheduleId}: + get: + summary: Get schedule by id + description: Returns schedule information based on the given schedule id + operationId: getSchedule + parameters: + - $ref: "#/components/parameters/scheduleIdPathParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Schedule" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - schedules + /api/v1/transactions: + get: + summary: List transactions + description: Lists transactions on the network. This includes successful and unsuccessful transactions. + operationId: getTransactions + parameters: + - $ref: "#/components/parameters/accountIdQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + - $ref: "#/components/parameters/timestampQueryParam" + - $ref: "#/components/parameters/transactionTypeQueryParam" + - name: result + in: query + description: The transaction success type. + schema: + enum: [success, fail] + - name: type + in: query + description: The transaction account balance modification type. + schema: + enum: [credit, debit] + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/TransactionsResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + tags: + - transactions + /api/v1/transactions/{transactionId}: + get: + summary: Get transaction by id + description: Returns transaction information based on the given transaction id + operationId: getTransaction + parameters: + - $ref: "#/components/parameters/transactionIdPathParam" + - $ref: "#/components/parameters/nonceQueryParam" + - $ref: "#/components/parameters/scheduledQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/TransactionByIdResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - transactions + /api/v1/topics/{topicId}: + get: + summary: Get topic by ID + description: Returns the topic details for the given topic ID. + operationId: getTopic + parameters: + - $ref: "#/components/parameters/topicIdPathParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Topic" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - topics + + /api/v1/topics/{topicId}/messages: + get: + summary: List topic messages by id + description: Returns the list of topic messages for the given topic id. + operationId: getTopicMessages + parameters: + - $ref: "#/components/parameters/topicIdPathParam" + - name: encoding + in: query + example: base64 + schema: + type: string + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParam" + - name: sequencenumber + in: query + example: 2 + schema: + format: int64 + minimum: 0 + type: integer + - $ref: "#/components/parameters/timestampQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/TopicMessagesResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/TopicNotFound" + tags: + - topics + /api/v1/topics/{topicId}/messages/{sequenceNumber}: + get: + summary: Get topic message by id and sequence number + description: Returns a single topic message for the given topic id and sequence number. + operationId: getTopicMessageByIdAndSequenceNumber + parameters: + - $ref: "#/components/parameters/topicIdPathParam" + - name: sequenceNumber + in: path + required: true + description: Topic message sequence number + example: 2 + schema: + format: int64 + minimum: 0 + type: integer + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/TopicMessage" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - topics + /api/v1/topics/messages/{timestamp}: + get: + summary: Get topic message by consensusTimestamp + description: Returns a topic message the given the consensusTimestamp. + operationId: getTopicMessageByTimestamp + parameters: + - $ref: "#/components/parameters/timestampPathParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/TopicMessage" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - topics + /api/v1/tokens: + get: + summary: List tokens + description: Returns a list of tokens on the network. + operationId: getTokens + parameters: + - $ref: "#/components/parameters/accountIdQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/tokenNameQueryParam" + - $ref: "#/components/parameters/orderQueryParam" + - $ref: "#/components/parameters/publicKeyQueryParam" + - $ref: "#/components/parameters/tokenIdQueryParam" + - $ref: "#/components/parameters/tokenTypeQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/TokensResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + tags: + - tokens + /api/v1/tokens/{tokenId}: + get: + summary: Get token by id + description: Returns token entity information given the id + operationId: getToken + parameters: + - $ref: "#/components/parameters/tokenIdPathParam" + - $ref: "#/components/parameters/tokenInfoTimestampQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/TokenInfo" + examples: + FungibleToken: + value: + admin_key: + _type: ProtobufEncoded + key: 010101 + auto_renew_account: 0.1.2 + auto_renew_period: + created_timestamp: "1234567890.000000001" + deleted: false + decimals: 1000 + expiry_timestamp: + freeze_default: false + freeze_key: + _type: ProtobufEncoded + key: 010101 + initial_supply: 1000000 + kyc_key: + _type: ProtobufEncoded + key: 010101 + max_supply: 9223372036854776000 + memo: "token memo" + modified_timestamp: "1234567890.000000001" + name: Token name + pause_key: + _type: ProtobufEncoded + key: 010101 + pause_status: UNPAUSED + supply_key: + _type: ProtobufEncoded + key: 010101 + supply_type: INFINITE + symbol: ORIGINALRDKSE + token_id: 0.10.1 + total_supply: 1000000 + treasury_account_id: 0.1.2 + type: FUNGIBLE_COMMON + wipe_key: + _type: ProtobufEncoded + key: 010101 + custom_fees: + created_timestamp: "1234567890.000000001" + fixed_fees: + - amount: 100 + collector_account_id: 0.1.5 + denominating_token_id: 0.10.8 + fractional_fees: + - amount: + numerator: 12 + denominator: 29 + collector_account_id: 0.1.6 + denominating_token_id: 0.10.9 + maximum: 120 + minimum: 30 + net_of_transfers: true + NonFungibleToken: + value: + admin_key: + _type: ProtobufEncoded + key: 010101 + auto_renew_account: 0.1.2 + auto_renew_period: + created_timestamp: "1234567890.000000001" + deleted: false + decimals: 0 + expiry_timestamp: + freeze_default: false + freeze_key: + _type: ProtobufEncoded + key: 010101 + initial_supply: 0 + kyc_key: + _type: ProtobufEncoded + key: 010101 + max_supply: 9223372036854776000 + memo: "token memo" + modified_timestamp: "1234567890.000000001" + name: Token name + pause_key: + _type: ProtobufEncoded + key: 010101 + pause_status: UNPAUSED + supply_key: + _type: ProtobufEncoded + key: 010101 + supply_type: INFINITE + symbol: ORIGINALRDKSE + token_id: 0.10.1 + total_supply: 1000000 + treasury_account_id: 0.1.2 + type: NON_FUNGIBLE_UNIQUE + wipe_key: + _type: ProtobufEncoded + key: 010101 + custom_fees: + created_timestamp: "1234567890.000000001" + fixed_fees: + - amount: 100 + collector_account_id: 0.1.5 + denominating_token_id: 0.10.6 + royalty_fees: + - amount: + numerator: 15 + denominator: 37 + collector_account_id: 0.1.6 + fallback_fee: + amount: 100 + denominating_token_id: 0.10.7 + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - tokens + /api/v1/tokens/{tokenId}/balances: + get: + summary: List token balances + description: Returns a list of token balances given the id. This represents the Token supply distribution across the network + operationId: getTokenBalances + parameters: + - $ref: "#/components/parameters/tokenIdPathParam" + - $ref: "#/components/parameters/accountBalanceQueryParam" + - $ref: "#/components/parameters/accountIdQueryParam" + - $ref: "#/components/parameters/accountPublicKeyQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + - $ref: "#/components/parameters/timestampQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/TokenBalancesResponse" + 400: + $ref: "#/components/responses/InvalidParameterError" + tags: + - tokens + /api/v1/tokens/{tokenId}/nfts: + get: + summary: List nfts + description: Returns a list of non-fungible tokens + operationId: getNfts + parameters: + - $ref: "#/components/parameters/tokenIdPathParam" + - $ref: "#/components/parameters/accountIdQueryParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + - $ref: "#/components/parameters/serialNumberQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Nfts" + 400: + $ref: "#/components/responses/InvalidParameterError" + tags: + - tokens + /api/v1/tokens/{tokenId}/nfts/{serialNumber}: + get: + summary: Get nft info + description: Returns information for a non-fungible token + operationId: getNft + parameters: + - $ref: "#/components/parameters/tokenIdPathParam" + - $ref: "#/components/parameters/serialNumberPathParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Nft" + 400: + $ref: "#/components/responses/InvalidParameterError" + 404: + $ref: "#/components/responses/NotFoundError" + tags: + - tokens + /api/v1/tokens/{tokenId}/nfts/{serialNumber}/transactions: + get: + summary: Get an nfts transction history + description: Returns a list of transactions for a given non-fungible token + operationId: getNftTransactions + parameters: + - $ref: "#/components/parameters/tokenIdPathParam" + - $ref: "#/components/parameters/serialNumberPathParam" + - $ref: "#/components/parameters/limitQueryParam" + - $ref: "#/components/parameters/orderQueryParamDesc" + - $ref: "#/components/parameters/timestampQueryParam" + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/NftTransactionHistory" + 206: + description: Partial Content + content: + application/json: + schema: + $ref: "#/components/schemas/NftTransactionHistory" + 400: + $ref: "#/components/responses/InvalidParameterError" + tags: + - tokens +tags: + - name: accounts + description: The accounts object represents the information associated with an account entity and returns a list of account information.The accounts list endpoint is cached and not updated as frequently as the account lookup by a specific ID endpoint. + externalDocs: + url: https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api#accounts + - name: balances + description: The balance object represents the balance of accounts on the Hedera network. + externalDocs: + url: https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api#balances + - name: contracts + description: The contracts objects represents the information associated with contract entities.The contracts list endpoint is cached and not updated as frequently as the contract lookup by a specific ID endpoint. + - name: schedules + description: The schedules object represents the information associated with a schedule entity.The schedules list endpoints is cached and not updated as frequently as the schedule lookup by a specific ID endpoint. + - name: transactions + description: The transaction object represents the transactions processed on the Hedera network. + externalDocs: + url: https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api#transactions + - name: topics + description: The topics object represents the information associated with a topic entity and returns topic messages information. + externalDocs: + url: https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api#topic-messages + - name: tokens + description: The tokens object represents the information associated with a token entity and returns a list of token information.The tokens list endpoint is cached and not updated as frequently as the token lookup by a specific ID. +info: + title: Hedera Mirror Node REST API + version: 0.122.0 + license: + name: Apache-2.0 + url: "https://www.apache.org/licenses/LICENSE-2.0.html" + description: "The Mirror Node REST API offers the ability to query cryptocurrency transactions and account information from a Hedera managed mirror node.\n\nBase url: [/api/v1](/api/v1)\n\nOpenAPI Spec: [/api/v1/docs/openapi.yml](/api/v1/docs/openapi.yml)" + contact: + name: Hedera Mirror Node Team + email: mirrornode@hedera.com + url: "https://github.com/hashgraph/hedera-mirror-node" +externalDocs: + description: Hedera REST API Docs + url: "https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api" +servers: + - description: The current REST API server + url: "" + - description: The production REST API servers + url: "{scheme}://{network}.mirrornode.hedera.com" + variables: + scheme: + default: https + description: The URI scheme + enum: [http, https] + network: + default: testnet + description: The Hedera network in use + enum: [mainnet-public, mainnet, previewnet, testnet] +components: + schemas: + AccountAlias: + description: >- + Account alias in the format of 'shard.realm.alias', 'realm.alias', or 'alias'. 'alias' is the RFC4648 + no-padding base32 encoded string of the account's alias. + type: string + pattern: ^(\d{1,5}\.){0,2}(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8})$ + # API call responses. + AccountsResponse: + type: object + required: + - accounts + - links + properties: + accounts: + $ref: "#/components/schemas/Accounts" + links: + $ref: "#/components/schemas/Links" + Allowance: + type: object + properties: + amount: + description: The amount remaining of the original amount granted. + format: int64 + type: integer + example: 75 + amount_granted: + description: The granted amount of the spender's allowance. + format: int64 + type: integer + example: 100 + owner: + $ref: "#/components/schemas/EntityId" + spender: + $ref: "#/components/schemas/EntityId" + timestamp: + $ref: "#/components/schemas/TimestampRange" + AssessedCustomFee: + type: object + properties: + amount: + format: int64 + type: integer + collector_account_id: + $ref: "#/components/schemas/EntityId" + effective_payer_account_ids: + type: array + items: + $ref: "#/components/schemas/EntityId" + token_id: + $ref: "#/components/schemas/EntityId" + BalancesResponse: + type: object + properties: + timestamp: + $ref: "#/components/schemas/TimestampNullable" + balances: + type: array + items: + $ref: "#/components/schemas/AccountBalance" + links: + $ref: "#/components/schemas/Links" + ContractResponse: + allOf: + - $ref: "#/components/schemas/Contract" + - type: object + properties: + bytecode: + type: string + nullable: true + format: binary + description: The contract bytecode in hex during deployment + example: "0x01021a1fdc9b" + runtime_bytecode: + type: string + nullable: true + format: binary + description: The contract bytecode in hex after deployment + example: "0x0302fa1ad39c" + ContractsResponse: + type: object + properties: + contracts: + $ref: "#/components/schemas/Contracts" + links: + $ref: "#/components/schemas/Links" + ContractResultsResponse: + type: object + properties: + results: + $ref: "#/components/schemas/ContractResults" + links: + $ref: "#/components/schemas/Links" + ContractStateResponse: + type: object + properties: + state: + type: array + items: + $ref: "#/components/schemas/ContractState" + links: + $ref: "#/components/schemas/Links" + ContractActionsResponse: + type: object + properties: + actions: + $ref: "#/components/schemas/ContractActions" + links: + $ref: "#/components/schemas/Links" + ContractLogsResponse: + type: object + properties: + logs: + $ref: "#/components/schemas/ContractLogs" + links: + $ref: "#/components/schemas/Links" + CryptoAllowancesResponse: + type: object + properties: + allowances: + $ref: "#/components/schemas/CryptoAllowances" + links: + $ref: "#/components/schemas/Links" + NetworkExchangeRateSetResponse: + type: object + properties: + current_rate: + $ref: "#/components/schemas/ExchangeRate" + next_rate: + $ref: "#/components/schemas/ExchangeRate" + timestamp: + $ref: "#/components/schemas/Timestamp" + NetworkFeesResponse: + type: object + properties: + fees: + $ref: "#/components/schemas/NetworkFees" + timestamp: + $ref: "#/components/schemas/Timestamp" + NetworkNodesResponse: + type: object + required: + - nodes + - links + properties: + nodes: + $ref: "#/components/schemas/NetworkNodes" + links: + $ref: "#/components/schemas/Links" + NetworkSupplyResponse: + type: object + properties: + released_supply: + description: The network's released supply of hbars in tinybars + example: "3999999999999999949" + type: string + timestamp: + allOf: + - $ref: "#/components/schemas/Timestamp" + - description: The consensus timestamp at which the released supply was valid + total_supply: + description: The network's total supply of hbars in tinybars + example: "5000000000000000000" + type: string + NftAllowancesResponse: + type: object + properties: + allowances: + $ref: "#/components/schemas/NftAllowances" + links: + $ref: "#/components/schemas/Links" + OpcodesResponse: + type: object + required: + - address + - contract_id + - failed + - gas + - opcodes + - return_value + properties: + address: + description: | + The address of the transaction recipient in hex. + Zero address is set for transactions without a recipient (e.g., contract create) + type: string + format: binary + contract_id: + $ref: "#/components/schemas/EntityId" + failed: + description: Whether the transaction failed to be completely processed. + type: boolean + gas: + description: The gas used in tinybars + type: integer + format: int64 + opcodes: + description: The logs produced by the opcode logger + type: array + items: + $ref: "#/components/schemas/Opcode" + return_value: + description: The returned data from the transaction in hex + type: string + format: binary + Opcode: + description: Represents a struct/opcode log entry in a trace + type: object + required: + - depth + - gas + - gas_cost + - memory + - op + - pc + - stack + - storage + properties: + depth: + description: The current call depth + type: integer + format: int32 + gas: + description: The remaining gas + type: integer + format: int64 + gas_cost: + description: The cost for executing op + type: integer + format: int64 + memory: + description: The EVM memory with items in hex + type: array + items: + type: string + format: binary + nullable: true + op: + description: The opcode to execute + type: string + pc: + description: The program counter + type: integer + format: int32 + reason: + description: The revert reason in hex + type: string + format: binary + nullable: true + stack: + description: The EVM stack with items in hex + type: array + items: + type: string + format: binary + nullable: true + storage: + description: The storage slots (keys and values in hex) of the current contract which is read from and written to + type: object + additionalProperties: + type: string + format: binary + nullable: true + SchedulesResponse: + type: object + properties: + schedules: + $ref: "#/components/schemas/Schedules" + links: + $ref: "#/components/schemas/Links" + BlocksResponse: + type: object + properties: + blocks: + $ref: "#/components/schemas/Blocks" + links: + $ref: "#/components/schemas/Links" + StakingRewardsResponse: + type: object + properties: + rewards: + type: array + items: + $ref: "#/components/schemas/StakingReward" + links: + $ref: "#/components/schemas/Links" + TokenAirdropsResponse: + type: object + properties: + airdrops: + $ref: "#/components/schemas/TokenAirdrops" + links: + $ref: "#/components/schemas/Links" + TokenAllowancesResponse: + type: object + properties: + allowances: + $ref: "#/components/schemas/TokenAllowances" + links: + $ref: "#/components/schemas/Links" + TokenBalancesResponse: + type: object + properties: + timestamp: + $ref: "#/components/schemas/TimestampNullable" + balances: + $ref: "#/components/schemas/TokenDistribution" + links: + $ref: "#/components/schemas/Links" + TokenRelationshipResponse: + type: object + properties: + tokens: + type: array + items: + $ref: "#/components/schemas/TokenRelationship" + links: + $ref: "#/components/schemas/Links" + TokensResponse: + type: object + properties: + tokens: + $ref: "#/components/schemas/Tokens" + links: + $ref: "#/components/schemas/Links" + TopicMessagesResponse: + type: object + properties: + messages: + $ref: "#/components/schemas/TopicMessages" + links: + $ref: "#/components/schemas/Links" + TransactionByIdResponse: + type: object + properties: + transactions: + $ref: "#/components/schemas/TransactionDetails" + TransactionsResponse: + type: object + properties: + transactions: + $ref: "#/components/schemas/Transactions" + links: + $ref: "#/components/schemas/Links" + # API objects. + AccountInfo: + type: object + required: + - account + - alias + - auto_renew_period + - balance + - created_timestamp + - decline_reward + - deleted + - ethereum_nonce + - evm_address + - expiry_timestamp + - key + - max_automatic_token_associations + - memo + - receiver_sig_required + - staked_account_id + - staked_node_id + - stake_period_start + properties: + account: + $ref: "#/components/schemas/EntityId" + alias: + $ref: "#/components/schemas/Alias" + auto_renew_period: + type: integer + format: int64 + nullable: true + balance: + $ref: "#/components/schemas/Balance" + created_timestamp: + $ref: "#/components/schemas/TimestampNullable" + decline_reward: + description: Whether the account declines receiving a staking reward + type: boolean + deleted: + type: boolean + nullable: true + ethereum_nonce: + type: integer + format: int64 + nullable: true + evm_address: + $ref: "#/components/schemas/EvmAddressNullable" + expiry_timestamp: + $ref: "#/components/schemas/TimestampNullable" + key: + $ref: "#/components/schemas/Key" + max_automatic_token_associations: + type: integer + format: int32 + nullable: true + memo: + type: string + nullable: true + pending_reward: + description: | + The pending reward in tinybars the account will receive in the next reward payout. Note the value is updated + at the end of each staking period and there may be delay to reflect the changes in the past staking period. + type: integer + format: int64 + receiver_sig_required: + nullable: true + type: boolean + staked_account_id: + allOf: + - $ref: "#/components/schemas/EntityId" + - description: The account to which this account is staking + staked_node_id: + description: The id of the node to which this account is staking + type: integer + format: int64 + nullable: true + stake_period_start: + allOf: + - $ref: "#/components/schemas/TimestampNullable" + - description: | + The staking period during which either the staking settings for this account changed (such as starting + staking or changing stakedNode) or the most recent reward was earned, whichever is later. If this + account is not currently staked to a node, then the value is null + example: + account: 0.0.8 + alias: HIQQEXWKW53RKN4W6XXC4Q232SYNZ3SZANVZZSUME5B5PRGXL663UAQA + auto_renew_period: null + balance: + timestamp: "0.000002345" + balance: 80 + tokens: + - token_id: 0.0.200001 + balance: 8 + created_timestamp: "1562591528.000123456" + decline_reward: false + deleted: false + ethereum_nonce: 10 + evm_address: "0xac384c53f03855fa1b3616052f8ba32c6c2a2fec" + expiry_timestamp: null + key: null + max_automatic_token_associations: 200 + memo: "entity memo" + pending_reward: 100 + receiver_sig_required: false + staked_account_id: null + staked_node_id: 3 + stake_period_start: "172800000.000000000" + Accounts: + type: array + items: + $ref: "#/components/schemas/AccountInfo" + AccountBalance: + type: object + required: + - account + - balance + - tokens + properties: + account: + $ref: "#/components/schemas/EntityId" + balance: + format: int64 + type: integer + tokens: + type: array + items: + $ref: "#/components/schemas/TokenBalance" + example: + account: 0.15.10 + balance: 80 + tokens: + - token_id: 0.0.200001 + balance: 8 + AccountBalanceTransactions: + allOf: + - $ref: "#/components/schemas/AccountInfo" + - type: object + required: + - transactions + - links + properties: + transactions: + $ref: "#/components/schemas/Transactions" + links: + $ref: "#/components/schemas/Links" + Alias: + description: RFC4648 no-padding base32 encoded account alias + type: string + pattern: ^(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8})$ + nullable: true + example: HIQQEXWKW53RKN4W6XXC4Q232SYNZ3SZANVZZSUME5B5PRGXL663UAQA + Balance: + type: object + required: + - timestamp + - balance + - tokens + properties: + timestamp: + $ref: "#/components/schemas/TimestampNullable" + balance: + format: int64 + nullable: true + type: integer + tokens: + type: array + items: + type: object + properties: + token_id: + $ref: "#/components/schemas/EntityId" + balance: + format: int64 + type: integer + nullable: true + example: + timestamp: "0.000002345" + balance: 80 + tokens: + - token_id: 0.0.200001 + balance: 8 + Bloom: + example: "0x549358c4c2e573e02410ef7b5a5ffa5f36dd7398" + format: binary + nullable: true + type: string + ChunkInfo: + type: object + nullable: true + properties: + initial_transaction_id: + $ref: "#/components/schemas/TransactionId" + number: + example: 1 + format: int32 + type: integer + total: + example: 2 + format: int32 + type: integer + Contract: + type: object + properties: + admin_key: + $ref: "#/components/schemas/Key" + auto_renew_account: + $ref: "#/components/schemas/EntityId" + auto_renew_period: + example: 7776000 + format: int64 + nullable: true + type: integer + contract_id: + $ref: "#/components/schemas/EntityId" + created_timestamp: + $ref: "#/components/schemas/TimestampNullable" + deleted: + type: boolean + example: false + evm_address: + $ref: "#/components/schemas/EvmAddress" + expiration_timestamp: + $ref: "#/components/schemas/TimestampNullable" + file_id: + $ref: "#/components/schemas/EntityId" + max_automatic_token_associations: + type: integer + format: int32 + nullable: true + memo: + example: contract memo + type: string + obtainer_id: + $ref: "#/components/schemas/EntityId" + permanent_removal: + type: boolean + nullable: true + proxy_account_id: + $ref: "#/components/schemas/EntityId" + timestamp: + $ref: "#/components/schemas/TimestampRange" + Contracts: + type: array + items: + $ref: "#/components/schemas/Contract" + ContractLog: + allOf: + - $ref: "#/components/schemas/ContractResultLog" + - type: object + properties: + block_hash: + description: The hex encoded block (record file chain) hash + example: "0x553f9311833391c0a3b2f9ed64540a89f2190a511986cd94889f1c0cf7fa63e898b1c6730f14a61755d1fb4ca05fb073" + type: string + block_number: + description: The block height calculated as the number of record files starting from zero since network start. + example: 10 + format: int64 + type: integer + root_contract_id: + allOf: + - $ref: "#/components/schemas/EntityId" + - description: The executed contract that created this contract log + timestamp: + $ref: "#/components/schemas/Timestamp" + transaction_hash: + type: string + description: A hex encoded transaction hash + example: "0x397022d1e5baeb89d0ab66e6bf602640610e6fb7e55d78638db861e2c6339aa9" + transaction_index: + description: The position of the transaction in the block + nullable: true + format: int32 + type: integer + example: 1 + ContractLogTopics: + description: A list of hex encoded topics associated with this log event + example: + - "0xf4757a49b326036464bec6fe419a4ae38c8a02ce3e68bf0809674f6aab8ad300" + items: + type: string + type: array + ContractAction: + type: object + properties: + call_depth: + description: The nesting depth of the call + example: 1 + format: int32 + nullable: false + type: integer + call_operation_type: + description: The type of the call operation + enum: + [CALL, CALLCODE, CREATE, CREATE2, DELEGATECALL, STATICCALL, UNKNOWN] + example: CALL + nullable: false + type: string + call_type: + description: The type of the call + enum: [NO_ACTION, CALL, CREATE, PRECOMPILE, SYSTEM] + example: CALL + nullable: false + type: string + caller: + $ref: "#/components/schemas/EntityId" + caller_type: + description: The entity type of the caller + type: string + enum: [ACCOUNT, CONTRACT] + example: ACCOUNT + nullable: false + from: + description: The EVM address of the caller + example: "0x0000000000000000000000000000000000000065" + nullable: false + type: string + gas: + description: Gas cost in tinybars + example: 50000 + nullable: false + format: int64 + type: integer + gas_used: + description: Gas used in tinybars + example: 50000 + nullable: false + format: int64 + type: integer + index: + description: The position of the action within the ordered list of actions + example: 0 + format: int32 + nullable: false + type: integer + input: + description: The hex encoded input data + example: "0x123456" + nullable: true + type: string + recipient: + $ref: "#/components/schemas/EntityId" + recipient_type: + description: The entity type of the recipient + type: string + enum: [ACCOUNT, CONTRACT] + example: ACCOUNT + nullable: true + result_data: + description: The hex encoded result data + example: "0x123456" + nullable: true + type: string + result_data_type: + description: The type of the result data + enum: [OUTPUT, REVERT_REASON, ERROR] + example: OUTPUT + nullable: false + type: string + timestamp: + $ref: "#/components/schemas/Timestamp" + to: + $ref: "#/components/schemas/EvmAddressNullable" + value: + description: The value of the transaction in tinybars + example: 50000 + nullable: false + format: int64 + type: integer + ContractResult: + type: object + properties: + access_list: + description: The hex encoded access_list of the wrapped ethereum transaction + nullable: true + type: string + example: "0xabcd" + address: + description: The hex encoded evm address of contract + example: "0x25fe26adc577cc89172e6156c9e24f7b9751b762" + type: string + amount: + description: The number of tinybars sent to the function + example: 10 + format: int64 + nullable: true + type: integer + block_gas_used: + description: The total amount of gas used in the block + example: 2000 + format: int64 + nullable: true + type: integer + block_hash: + description: The hex encoded block (record file chain) hash + example: "0x6ceecd8bb224da491" + nullable: true + type: string + block_number: + description: The block height calculated as the number of record files starting from zero since network start. + example: 10 + format: int64 + nullable: true + type: integer + bloom: + allOf: + - $ref: "#/components/schemas/Bloom" + - description: The hex encoded bloom filter of the contract result + call_result: + description: The hex encoded result returned by the function + example: "0x2b048531b38d2882e86044bc972e940ee0a01938" + nullable: true + type: string + chain_id: + description: The hex encoded chain_id of the wrapped ethereum transaction + nullable: true + type: string + example: "0x0127" + contract_id: + $ref: "#/components/schemas/EntityId" + created_contract_ids: + description: The list of smart contracts that were created by the function call. + items: + $ref: "#/components/schemas/EntityId" + nullable: true + type: array + error_message: + description: The message when an error occurs during smart contract execution + example: "Out of gas" + nullable: true + type: string + failed_initcode: + description: The hex encoded initcode of a failed contract create transaction + example: "0x856739" + type: string + from: + $ref: "#/components/schemas/EvmAddressNullable" + function_parameters: + description: The hex encoded parameters passed to the function + example: "0xbb9f02dc6f0e3289f57a1f33b71c73aa8548ab8b" + nullable: true + type: string + gas_consumed: + description: The units of consumed gas by the EVM to execute contract + example: 35000 + format: int64 + nullable: true + type: integer + gas_limit: + description: The maximum units of gas allowed for contract execution + example: 100000 + format: int64 + type: integer + gas_price: + description: The hex encoded gas_price of the wrapped ethereum transaction + nullable: true + type: string + example: "0x4a817c800" + gas_used: + description: The units of gas used to execute contract + example: 80000 + format: int64 + nullable: true + type: integer + hash: + description: A hex encoded 32 byte hash and it is only populated for Ethereum transaction case + example: "0xfebbaa29c513d124a6377246ea3506ad917d740c21a88f61a1c55ba338fc2bb1" + type: string + max_fee_per_gas: + description: The hex encoded max_fee_per_gas of the wrapped ethereum transaction + nullable: true + type: string + example: "0x5" + max_priority_fee_per_gas: + description: The hex encoded max_priority_fee_per_gas of the wrapped ethereum transaction + nullable: true + type: string + example: "0x100" + nonce: + description: The nonce of the wrapped ethereum transaction + nullable: true + format: int64 + type: integer + example: 1 + r: + description: The hex encoded signature_r of the wrapped ethereum transaction + nullable: true + type: string + example: "0xd693b532a80fed6392b428604171fb32fdbf953728a3a7ecc7d4062b1652c043" + result: + description: The result of the transaction + example: SUCCESS + type: string + s: + description: The hex encoded signature_s of the wrapped ethereum transaction + nullable: true + type: string + example: "0x24e9c602ac800b983b035700a14b23f78a253ab762deab5dc27e3555a750b355" + status: + description: The status of the transaction, 0x1 for a SUCCESS transaction and 0x0 for all else + example: 0x1 + type: string + timestamp: + $ref: "#/components/schemas/Timestamp" + to: + $ref: "#/components/schemas/EvmAddressNullable" + transaction_index: + description: The position of the transaction in the block + nullable: true + format: int64 + type: integer + example: 1 + type: + description: The type of the wrapped ethereum transaction, 0 (Pre-Eip1559) or 2 (Post-Eip1559) + nullable: true + type: integer + example: 2 + v: + description: The recovery_id of the wrapped ethereum transaction + nullable: true + type: integer + example: 1 + ContractResultDetails: + allOf: + - $ref: "#/components/schemas/ContractResult" + - type: object + properties: + access_list: + description: The hex encoded access_list of the wrapped ethereum transaction + nullable: true + type: string + example: "0xabcd" + address: + description: The hex encoded evm address of contract + example: "0x25fe26adc577cc89172e6156c9e24f7b9751b762" + type: string + block_gas_used: + description: The total amount of gas used in the block + example: 2000 + format: int64 + nullable: true + type: integer + block_hash: + description: The hex encoded block (record file chain) hash + example: "0x6ceecd8bb224da491" + nullable: true + type: string + block_number: + description: The block height calculated as the number of record files starting from zero since network start. + example: 10 + format: int64 + nullable: true + type: integer + chain_id: + description: The hex encoded chain_id of the wrapped ethereum transaction + nullable: true + type: string + example: "0x0127" + failed_initcode: + description: The hex encoded initcode of a failed contract create transaction + example: "0x856739" + type: string + gas_price: + description: The hex encoded gas_price of the wrapped ethereum transaction + nullable: true + type: string + example: "0x4a817c800" + hash: + description: The hex encoded transaction hash + example: "0x3531396130303866616264653464" + type: string + logs: + $ref: "#/components/schemas/ContractResultLogs" + max_fee_per_gas: + description: The hex encoded max_fee_per_gas of the wrapped ethereum transaction + nullable: true + type: string + example: "0x5" + max_priority_fee_per_gas: + description: The hex encoded max_priority_fee_per_gas of the wrapped ethereum transaction + nullable: true + type: string + example: "0x100" + nonce: + description: The nonce of the wrapped ethereum transaction + nullable: true + format: int64 + type: integer + example: 1 + r: + description: The hex encoded signature_r of the wrapped ethereum transaction + nullable: true + type: string + example: "0xd693b532a80fed6392b428604171fb32fdbf953728a3a7ecc7d4062b1652c043" + s: + description: The hex encoded signature_s of the wrapped ethereum transaction + nullable: true + type: string + example: "0x24e9c602ac800b983b035700a14b23f78a253ab762deab5dc27e3555a750b355" + state_changes: + $ref: "#/components/schemas/ContractResultStateChanges" + transaction_index: + description: The position of the transaction in the block + nullable: true + format: int64 + type: integer + example: 1 + type: + description: The type of the wrapped ethereum transaction, 0 (Pre-Eip1559) or 2 (Post-Eip1559) + nullable: true + type: integer + example: 2 + v: + description: The recovery_id of the wrapped ethereum transaction + nullable: true + type: integer + example: 1 + ContractResultLog: + type: object + properties: + address: + description: The hex encoded EVM address of the contract + example: "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" + pattern: ^0x[0-9A-Fa-f]{40}$ + type: string + bloom: + allOf: + - $ref: "#/components/schemas/Bloom" + - description: The hex encoded bloom filter of the contract log + contract_id: + $ref: "#/components/schemas/EntityId" + data: + description: The hex encoded data of the contract log + example: "0x00000000000000000000000000000000000000000000000000000000000000fa" + nullable: true + type: string + index: + description: The index of the contract log in the chain of logs for an execution + example: 0 + type: integer + topics: + $ref: "#/components/schemas/ContractLogTopics" + ContractResultLogs: + type: array + items: + $ref: "#/components/schemas/ContractResultLog" + ContractState: + type: object + required: + - address + - contract_id + - timestamp + - slot + - value + properties: + address: + $ref: "#/components/schemas/EvmAddress" + contract_id: + $ref: "#/components/schemas/EntityId" + timestamp: + $ref: "#/components/schemas/Timestamp" + slot: + description: The hex encoded storage slot. + format: binary + example: "0x00000000000000000000000000000000000000000000000000000000000000fa" + nullable: false + type: string + value: + description: The hex encoded value to the slot. `0x` implies no value written. + example: "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" + format: binary + nullable: false + type: string + ContractResultStateChange: + type: object + properties: + address: + $ref: "#/components/schemas/EvmAddress" + contract_id: + $ref: "#/components/schemas/EntityId" + slot: + description: The hex encoded storage slot changed. + format: binary + example: "0x00000000000000000000000000000000000000000000000000000000000000fa" + type: string + value_read: + description: The hex encoded value read from the storage slot. + example: "0x97c1fc0a6ed5551bc831571325e9bdb365d06803100dc20648640ba24ce69750" + format: binary + type: string + value_written: + description: The hex encoded value written to the slot. `null` implies no value written. + example: "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" + format: binary + nullable: true + type: string + ContractResultStateChanges: + type: array + items: + $ref: "#/components/schemas/ContractResultStateChange" + ContractResults: + type: array + items: + $ref: "#/components/schemas/ContractResult" + ContractActions: + type: array + items: + $ref: "#/components/schemas/ContractAction" + ContractLogs: + type: array + items: + $ref: "#/components/schemas/ContractLog" + CustomFees: + type: object + properties: + created_timestamp: + $ref: "#/components/schemas/Timestamp" + fixed_fees: + type: array + items: + $ref: "#/components/schemas/FixedFee" + fractional_fees: + type: array + items: + $ref: "#/components/schemas/FractionalFee" + royalty_fees: + type: array + items: + $ref: "#/components/schemas/RoyaltyFee" + CryptoAllowance: + allOf: + - $ref: "#/components/schemas/Allowance" + - properties: + amount: + description: The amount remaining of the original amount granted in tinybars. + type: integer + format: int64 + amount_granted: + description: The granted amount of the spender's allowance in tinybars. + type: integer + format: int64 + CryptoAllowances: + type: array + items: + $ref: "#/components/schemas/CryptoAllowance" + EntityId: + type: string + description: "Network entity ID in the format of `shard.realm.num`" + pattern: '^\d{1,10}\.\d{1,10}\.\d{1,10}$' + example: "0.0.2" + nullable: true + EntityIdQuery: + type: string + pattern: ^((gte?|lte?|eq|ne)\:)?(\d{1,10}\.\d{1,10}\.)?\d{1,10}$ + Error: + type: object + properties: + _status: + type: object + properties: + messages: + type: array + items: + type: object + properties: + data: + description: Error message in hexadecimal + example: "0x3000" + format: binary + nullable: true + pattern: "^0x[0-9a-fA-F]+$" + type: string + detail: + description: Detailed error message + example: Generic detailed error message + nullable: true + type: string + message: + description: Error message + example: Generic error message + nullable: false + type: string + ContractCallRequest: + type: object + properties: + block: + description: Hexadecimal block number or the string "latest", "pending", "earliest". Defaults to "latest". + example: "latest" + nullable: true + pattern: "^((0x)?[0-9a-fA-F]+|(earliest|pending|latest))$" + type: string + data: + description: Hexadecimal method signature and encoded parameters. Up to 24656 bytes as at most 49152 hexidecimal digits plus optional leading 0x. + example: "0x47f1aae7" + format: binary + maxLength: 49154 + nullable: true + pattern: "^(0x)?[0-9a-fA-F]+$" + type: string + estimate: + description: Whether gas estimation is called. Defaults to false. + example: true + nullable: true + type: boolean + from: + description: The 20-byte hexadecimal EVM address the transaction is sent from. + example: "00000000000000000000000000000000000004e2" + format: binary + maxLength: 42 + minLength: 40 + nullable: true + pattern: "^(0x)?[A-Fa-f0-9]{40}$" + type: string + gas: + description: Gas provided for the transaction execution. Defaults to 15000000. + example: 15000000 + format: int64 + minimum: 0 + nullable: true + type: integer + gasPrice: + description: Gas price used for each paid gas. + example: 100000000 + format: int64 + minimum: 0 + nullable: true + type: integer + to: + description: The 20-byte hexadecimal EVM address the transaction is directed to. + example: "0xd9d0c5c0ff85758bdf05a7636f8036d4d065f5b6" + format: binary + maxLength: 42 + minLength: 40 + nullable: false + pattern: "^(0x)?[A-Fa-f0-9]{40}$" + type: string + value: + description: Value sent with this transaction. Defaults to 0. + example: 0 + format: int64 + minimum: 0 + nullable: true + type: integer + required: + - to + ContractCallResponse: + type: object + properties: + result: + description: Result in hexadecimal from executed contract call. + example: "0x0000000000006d8d" + format: binary + nullable: false + pattern: "^0x[0-9a-fA-F]+$" + type: string + HederaHash: + type: string + description: A hex encoded hedera transaction hash. + minLength: 96 + maxLength: 98 + pattern: "^(0x)?[A-Fa-f0-9]{96}$" + EthereumHash: + type: string + description: A hex encoded ethereum transaction hash. + minLength: 64 + maxLength: 66 + pattern: "^(0x)?[A-Fa-f0-9]{64}$" + PositiveNumber: + type: integer + format: int64 + description: A positive number. + minimum: 0 + EvmAddress: + type: string + description: A network entity encoded as an EVM address in hex. + format: binary + minLength: 40 + maxLength: 42 + pattern: "^(0x)?[A-Fa-f0-9]{40}$" + example: "0000000000000000000000000000000000001f41" + EvmAddressWithShardRealm: + type: string + description: A network entity encoded as an EVM address in hex. + format: binary + minLength: 40 + maxLength: 60 + pattern: '^(\d{1,10}\.){0,2}[A-Fa-f0-9]{40}$' + example: "0x0000000000000000000000000000000000001f41" + EvmAddressNullable: + type: string + description: A network entity encoded as an EVM address in hex. + format: binary + minLength: 40 + maxLength: 42 + nullable: true + pattern: "^(0x)?[A-Fa-f0-9]{40}$" + example: "0x0000000000000000000000000000000000001f41" + ExchangeRate: + type: object + properties: + cent_equivalent: + format: int32 + example: 596987 + type: integer + expiration_time: + format: int64 + example: 1649689200 + type: integer + hbar_equivalent: + example: 30000 + format: int32 + type: integer + FixedFee: + type: object + properties: + all_collectors_are_exempt: + type: boolean + example: false + nullable: false + amount: + example: 100 + format: int64 + type: integer + collector_account_id: + $ref: "#/components/schemas/EntityId" + denominating_token_id: + $ref: "#/components/schemas/EntityId" + FractionalFee: + type: object + properties: + all_collectors_are_exempt: + type: boolean + example: false + amount: + type: object + properties: + numerator: + example: 12 + format: int64 + type: integer + denominator: + example: 29 + format: int64 + type: integer + collector_account_id: + $ref: "#/components/schemas/EntityId" + denominating_token_id: + $ref: "#/components/schemas/EntityId" + maximum: + example: 120 + format: int64 + nullable: true + type: integer + minimum: + example: 30 + format: int64 + type: integer + net_of_transfers: + type: boolean + example: true + RoyaltyFee: + type: object + properties: + all_collectors_are_exempt: + type: boolean + example: false + amount: + type: object + properties: + numerator: + example: 15 + format: int64 + type: integer + denominator: + example: 37 + format: int64 + type: integer + collector_account_id: + $ref: "#/components/schemas/EntityId" + fallback_fee: + type: object + properties: + amount: + example: 100 + format: int64 + type: integer + denominating_token_id: + $ref: "#/components/schemas/EntityId" + Key: + description: The public key which controls access to various network entities. + type: object + nullable: true + properties: + _type: + type: string + enum: [ECDSA_SECP256K1, ED25519, ProtobufEncoded] + example: ProtobufEncoded + key: + type: string + example: "15706b229b3ba33d4a5a41ff54ce1cfe0a3d308672a33ff382f81583e02bd743" + Links: + type: object + properties: + next: + example: null + nullable: true + type: string + NetworkNode: + type: object + required: + - admin_key + - description + - file_id + - max_stake + - memo + - min_stake + - node_account_id + - node_id + - node_cert_hash + - public_key + - reward_rate_start + - service_endpoints + - stake + - stake_not_rewarded + - stake_rewarded + - staking_period + - timestamp + properties: + admin_key: + $ref: "#/components/schemas/Key" + description: + description: a memo associated with the address book + nullable: true + type: string + file_id: + $ref: "#/components/schemas/EntityId" + max_stake: + description: The maximum stake (rewarded or not rewarded) this node can have as consensus weight + type: integer + format: int64 + nullable: true + memo: + description: memo + nullable: true + type: string + min_stake: + description: | + The minimum stake (rewarded or not rewarded) this node must reach before having non-zero consensus weight + type: integer + format: int64 + nullable: true + node_account_id: + $ref: "#/components/schemas/EntityId" + node_id: + description: An identifier for the node + format: int64 + type: integer + node_cert_hash: + description: hex encoded hash of the node's TLS certificate + nullable: true + type: string + public_key: + description: hex encoded X509 RSA public key used to verify stream file signature + nullable: true + type: string + reward_rate_start: + description: The total tinybars earned by this node per whole hbar in the last staking period + format: int64 + nullable: true + type: integer + service_endpoints: + $ref: "#/components/schemas/ServiceEndpoints" + stake: + description: The node consensus weight at the beginning of the staking period + format: int64 + nullable: true + type: integer + stake_not_rewarded: + description: | + The sum (balance + stakedToMe) for all accounts staked to this node with declineReward=true at the + beginning of the staking period + format: int64 + nullable: true + type: integer + stake_rewarded: + description: | + The sum (balance + staked) for all accounts staked to the node that are not declining rewards at the + beginning of the staking period + format: int64 + nullable: true + type: integer + staking_period: + allOf: + - $ref: "#/components/schemas/TimestampRangeNullable" + - description: The timestamp range of the staking period + timestamp: + $ref: "#/components/schemas/TimestampRange" + example: + admin_key: + _type: "ED25519" + key: "15706b229b3ba33d4a5a41ff54ce1cfe0a3d308672a33ff382f81583e02bd743" + description: "address book 1" + file_id: "0.0.102" + max_stake: 50000 + memo: "0.0.4" + min_stake: 1000 + node_account_id: "0.0.4" + node_cert_hash: "0x01d173753810c0aae794ba72d5443c292e9ff962b01046220dd99f5816422696e0569c977e2f169e1e5688afc8f4aa16" + node_id: 1 + public_key: "0x4a5ad514f0957fa170a676210c9bdbddf3bc9519702cf915fa6767a40463b96f" + reward_rate_start: 1000000 + service_endpoints: + - ip_address_v4: 128.0.0.6 + port: 50216 + stake: 20000 + stake_not_rewarded: 19900 + stake_rewarded: 100 + staking_period: + from: "1655164800.000000000" + to: "1655251200.000000000" + timestamp: + from: "187654.000123457" + to: null + NetworkNodes: + type: array + items: + $ref: "#/components/schemas/NetworkNode" + NetworkFee: + type: object + properties: + gas: + description: gas cost in tinybars + format: int64 + type: integer + transaction_type: + description: type of the transaction + type: string + NetworkFees: + type: array + items: + $ref: "#/components/schemas/NetworkFee" + NetworkStakeResponse: + type: object + required: + - max_stake_rewarded + - max_staking_reward_rate_per_hbar + - max_total_reward + - node_reward_fee_fraction + - reserved_staking_rewards + - reward_balance_threshold + - stake_total + - staking_period + - staking_period_duration + - staking_periods_stored + - staking_reward_fee_fraction + - staking_reward_rate + - staking_start_threshold + - unreserved_staking_reward_balance + properties: + max_stake_rewarded: + description: | + The maximum amount of tinybar that can be staked for reward while still achieving + the maximum per-hbar reward rate + format: int64 + type: integer + max_staking_reward_rate_per_hbar: + description: The maximum reward rate, in tinybars per whole hbar, that any account can receive in a day + type: integer + format: int64 + max_total_reward: + description: | + The total tinybars to be paid as staking rewards in the ending period, + after applying the settings for the 0.0.800 balance threshold and the maximum stake rewarded + format: int64 + type: integer + node_reward_fee_fraction: + description: The fraction between zero and one of the network and service fees paid to the node reward account 0.0.801 + type: number + format: float + reserved_staking_rewards: + description: | + The amount of the staking reward funds of account 0.0.800 reserved to pay pending + rewards that have been earned but not collected + format: int64 + type: integer + reward_balance_threshold: + description: | + The unreserved tinybar balance of account 0.0.800 required to achieve the + maximum per-hbar reward rate + format: int64 + type: integer + stake_total: + description: The total amount staked to the network in tinybars the start of the current staking period + type: integer + format: int64 + staking_period: + allOf: + - $ref: "#/components/schemas/TimestampRange" + - description: The timestamp range of the staking period + staking_period_duration: + description: The number of minutes in a staking period + type: integer + format: int64 + staking_periods_stored: + description: The number of staking periods for which the reward is stored for each node + type: integer + format: int64 + staking_reward_fee_fraction: + description: The fraction between zero and one of the network and service fees paid to the staking reward account 0.0.800 + type: number + format: float + staking_reward_rate: + description: The total number of tinybars to be distributed as staking rewards each period + type: integer + format: int64 + staking_start_threshold: + description: The minimum balance of staking reward account 0.0.800 required to active rewards + type: integer + format: int64 + unreserved_staking_reward_balance: + description: | + The unreserved balance of account 0.0.800 at the close of the just-ending period; + this value is used to compute the HIP-782 balance ratio + format: int64 + type: integer + example: + max_stake_rewarded: 10 + max_staking_reward_rate_per_hbar: 17808 + max_total_reward: 20 + node_reward_fee_fraction: 1.0 + reserved_staking_rewards: 30 + reward_balance_threshold: 40 + stake_total: 35000000000000000 + staking_period: + from: "1655164800.000000000" + to: "1655251200.000000000" + staking_period_duration: 1440 + staking_periods_stored: 365 + staking_reward_fee_fraction: 1.0 + staking_reward_rate: 100000000000 + staking_start_threshold: 25000000000000000 + unreserved_staking_reward_balance: 50 + Nft: + type: object + properties: + account_id: + $ref: "#/components/schemas/EntityId" + created_timestamp: + $ref: "#/components/schemas/TimestampNullable" + delegating_spender: + $ref: "#/components/schemas/EntityId" + deleted: + description: whether the nft or the token it belongs to has been deleted + type: boolean + metadata: + description: Arbitrary binary data associated with this NFT encoded in base64. + type: string + format: byte + modified_timestamp: + $ref: "#/components/schemas/TimestampNullable" + serial_number: + example: 1 + format: int64 + type: integer + spender: + $ref: "#/components/schemas/EntityId" + token_id: + $ref: "#/components/schemas/EntityId" + example: + account_id: "0.1.2" + created_timestamp: "1234567890.000000001" + delegating_spender: "0.0.400" + deleted: false + metadata: "VGhpcyBpcyBhIHRlc3QgTkZU" + modified_timestamp: "1610682445.003266001" + serial_number: 124 + spender_id: "0.0.500" + token_id: "0.0.222" + Nfts: + type: object + properties: + nfts: + type: array + items: + $ref: "#/components/schemas/Nft" + links: + $ref: "#/components/schemas/Links" + NftAllowance: + type: object + properties: + approved_for_all: + description: A boolean value indicating if the spender has the allowance to spend all NFTs owned by the given owner + example: true + type: boolean + owner: + $ref: "#/components/schemas/EntityId" + spender: + $ref: "#/components/schemas/EntityId" + timestamp: + $ref: "#/components/schemas/TimestampRange" + token_id: + $ref: "#/components/schemas/EntityId" + example: + approved_for_all: false + owner: "0.0.11" + payer_account_id: "0.0.10" + spender: "0.0.15" + timestamp: + from: "1651560386.060890949" + to: "1651560386.661997287" + token_id: "0.0.99" + required: + - approved_for_all + - owner + - spender + - timestamp + - token_id + NftAllowances: + type: array + items: + $ref: "#/components/schemas/NftAllowance" + NftTransactionTransfer: + type: object + properties: + consensus_timestamp: + $ref: "#/components/schemas/Timestamp" + is_approval: + type: boolean + nonce: + type: integer + minimum: 0 + receiver_account_id: + $ref: "#/components/schemas/EntityId" + sender_account_id: + $ref: "#/components/schemas/EntityId" + transaction_id: + type: string + type: + $ref: "#/components/schemas/TransactionTypes" + example: + consensus_timestamp: "1618591023.997420021" + is_approval: false + nonce: 0 + receiver_account_id: "0.0.11" + sender_account_id: "0.0.10" + transaction_id: "0.0.19789-1618591023-997420021" + type: "CRYPTOTRANSFER" + required: + - consensus_timestamp + - is_approval + - nonce + - receiver_account_id + - sender_account_id + - transaction_id + - type + Block: + type: object + properties: + count: + type: integer + minimum: 0 + gas_used: + type: integer + minimum: 0 + format: int64 + nullable: true + hapi_version: + type: string + nullable: true + hash: + type: string + logs_bloom: + description: A hex encoded 256-byte array with 0x prefix + nullable: true + type: string + pattern: ^0x[0-9a-fA-F]{512}$ + name: + type: string + number: + type: integer + minimum: 0 + previous_hash: + type: string + size: + type: integer + nullable: true + timestamp: + $ref: "#/components/schemas/TimestampRange" + example: + count: 3 + gas_used: 300000 + hapi_version: "0.11.0" + hash: "0x3c08bbbee74d287b1dcd3f0ca6d1d2cb92c90883c4acf9747de9f3f3162ad25b999fc7e86699f60f2a3fb3ed9a646c6b" + logs_bloom: "0x00000020002000001000000000000000000000000000000000000000000010000000000004000000000000000000000000108000000000000000000080000000000004000000000000000000000000880000000000000000000101000000000000000000000000000000000000008000000000000400000080000000000001000000000000000000000000000000000000000000002000000000100000100000200000040000100000001000000000000000000000000000000001001000004000000000000000000001000000000000000000100000000000100000000000000000000000000000000000000000000000080000100800000000000000120080" + name: "2022-05-03T06_46_26.060890949Z.rcd" + number: 77 + previous_hash: "0xf7d6481f659c866c35391ee230c374f163642ebf13a5e604e04a95a9ca48a298dc2dfa10f51bcbaab8ae23bc6d662a0b" + size: 8192 + timestamp: + from: "1651560386.060890949" + to: "1651560386.661997287" + Blocks: + type: array + items: + $ref: "#/components/schemas/Block" + NftTransactionHistory: + type: object + properties: + transactions: + type: array + items: + $ref: "#/components/schemas/NftTransactionTransfer" + links: + $ref: "#/components/schemas/Links" + required: + - transactions + - links + Schedule: + type: object + properties: + admin_key: + $ref: "#/components/schemas/Key" + consensus_timestamp: + $ref: "#/components/schemas/Timestamp" + creator_account_id: + $ref: "#/components/schemas/EntityId" + deleted: + type: boolean + example: false + executed_timestamp: + $ref: "#/components/schemas/TimestampNullable" + expiration_time: + $ref: "#/components/schemas/TimestampNullable" + memo: + type: string + example: "created on 02/10/2021" + payer_account_id: + $ref: "#/components/schemas/EntityId" + schedule_id: + $ref: "#/components/schemas/EntityId" + signatures: + type: array + items: + $ref: "#/components/schemas/ScheduleSignature" + transaction_body: + type: string + format: byte + example: Kd6tvu8= + wait_for_expiry: + type: boolean + Schedules: + type: array + items: + $ref: "#/components/schemas/Schedule" + ScheduleSignature: + type: object + properties: + consensus_timestamp: + $ref: "#/components/schemas/Timestamp" + public_key_prefix: + type: string + format: byte + example: "AAEBAwuqAwzB" + signature: + type: string + format: byte + example: "3q2+7wABAQMLqgMMwQ==" + type: + type: string + enum: + [CONTRACT, ED25519, RSA_3072, ECDSA_384, ECDSA_SECP256K1, UNKNOWN] + example: "ED25519" + ServiceEndpoint: + type: object + required: + - domain_name + - ip_address_v4 + - port + properties: + domain_name: + type: string + ip_address_v4: + type: string + port: + format: int32 + type: integer + example: + domain_name: www.example.com + ip_address_v4: 127.0.0.1 + port: 50211 + ServiceEndpoints: + type: array + items: + $ref: "#/components/schemas/ServiceEndpoint" + StakingReward: + type: object + properties: + account_id: + $ref: "#/components/schemas/EntityId" + amount: + description: The number of tinybars awarded + example: 10 + format: int64 + type: integer + nullable: false + timestamp: + $ref: "#/components/schemas/Timestamp" + required: + - account_id + - amount + - timestamp + example: + account_id: 0.0.1000 + amount: 10 + timestamp: "1234567890.000000001" + StakingRewardTransfer: + type: object + description: A staking reward transfer + required: + - account + - amount + properties: + account: + $ref: "#/components/schemas/EntityId" + amount: + description: The number of tinybars awarded + example: 10 + format: int64 + type: integer + nullable: false + example: + account_id: 0.0.1000 + amount: 10 + StakingRewardTransfers: + type: array + items: + $ref: "#/components/schemas/StakingRewardTransfer" + Timestamp: + description: A Unix timestamp in seconds.nanoseconds format + type: string + example: "1586567700.453054000" + pattern: '^\d{1,10}(\.\d{1,9})?$' + TimestampNullable: + description: A Unix timestamp in seconds.nanoseconds format + type: string + example: "1586567700.453054000" + pattern: '^\d{1,10}(\.\d{1,9})?$' + nullable: true + TimestampRange: + type: object + description: A timestamp range an entity is valid for + properties: + from: + allOf: + - $ref: "#/components/schemas/Timestamp" + - description: The inclusive from timestamp in seconds + to: + allOf: + - $ref: "#/components/schemas/TimestampNullable" + - description: The exclusive to timestamp in seconds + TimestampRangeNullable: + type: object + description: A timestamp range an entity is valid for + nullable: true + properties: + from: + allOf: + - $ref: "#/components/schemas/Timestamp" + - description: The inclusive from timestamp in seconds + to: + allOf: + - $ref: "#/components/schemas/TimestampNullable" + - description: The exclusive to timestamp in seconds + Token: + type: object + properties: + admin_key: + $ref: "#/components/schemas/Key" + decimals: + format: int64 + type: integer + metadata: + description: Arbitrary binary data associated with this token class encoded in base64. + type: string + format: byte + name: + type: string + symbol: + type: string + token_id: + $ref: "#/components/schemas/EntityId" + type: + type: string + required: + - admin_key + - decimals + - name + - symbol + - token_id + - type + example: + admin_key: null + decimals: 3 + metadata: "VGhpcyBpcyBhIHRlc3QgTkZU" + name: First Mover + symbol: FIRSTMOVERLPDJH + token_id: 0.0.1 + type: FUNGIBLE_COMMON + TokenAirdrop: + type: object + properties: + amount: + format: int64 + type: integer + receiver_id: + $ref: "#/components/schemas/EntityId" + sender_id: + $ref: "#/components/schemas/EntityId" + serial_number: + example: 1 + format: int64 + nullable: true + type: integer + timestamp: + $ref: "#/components/schemas/TimestampRange" + token_id: + $ref: "#/components/schemas/EntityId" + example: + amount: 10 + receiver_id: "0.0.15" + sender_id: "0.0.10" + serial_number: null + timestamp: + from: "1651560386.060890949" + to: "1651560386.661997287" + token_id: "0.0.99" + required: + - amount + - receiver_id + - sender_id + - timestamp + - token_id + TokenAirdrops: + type: array + items: + $ref: "#/components/schemas/TokenAirdrop" + TokenAllowance: + allOf: + - $ref: "#/components/schemas/Allowance" + - properties: + token_id: + $ref: "#/components/schemas/EntityId" + TokenAllowances: + type: array + items: + $ref: "#/components/schemas/TokenAllowance" + TokenBalance: + type: object + required: + - token_id + - balance + properties: + token_id: + $ref: "#/components/schemas/EntityId" + balance: + format: int64 + type: integer + example: + token_id: 0.0.200001 + balance: 8 + TokenDistribution: + type: array + items: + type: object + properties: + account: + $ref: "#/components/schemas/EntityId" + balance: + format: int64 + type: integer + decimals: + format: int64 + type: integer + required: + - account + - balance + - decimals + example: + - account: 0.15.2 + balance: 1000 + decimals: 3 + TokenInfo: + type: object + properties: + admin_key: + $ref: "#/components/schemas/Key" + auto_renew_account: + $ref: "#/components/schemas/EntityId" + auto_renew_period: + example: null + format: int64 + nullable: true + type: integer + created_timestamp: + $ref: "#/components/schemas/Timestamp" + decimals: + type: string + example: 1000 + deleted: + type: boolean + example: true + nullable: true + expiry_timestamp: + example: 1234567890100000 + format: int64 + nullable: true + type: integer + fee_schedule_key: + $ref: "#/components/schemas/Key" + freeze_default: + type: boolean + example: false + freeze_key: + $ref: "#/components/schemas/Key" + initial_supply: + type: string + example: "1000000" + kyc_key: + $ref: "#/components/schemas/Key" + max_supply: + type: string + example: "9223372036854775807" + metadata: + description: Arbitrary binary data associated with this token class encoded in base64. + type: string + format: byte + metadata_key: + allOf: + - $ref: "#/components/schemas/Key" + - description: The key which can change the metadata of a token and individual NFTs. + modified_timestamp: + $ref: "#/components/schemas/Timestamp" + name: + type: string + example: Token name + memo: + type: string + example: "token memo" + pause_key: + $ref: "#/components/schemas/Key" + pause_status: + type: string + enum: [NOT_APPLICABLE, PAUSED, UNPAUSED] + example: UNPAUSED + supply_key: + $ref: "#/components/schemas/Key" + supply_type: + type: string + enum: [FINITE, INFINITE] + example: INFINITE + symbol: + type: string + example: ORIGINALRDKSE + token_id: + $ref: "#/components/schemas/EntityId" + total_supply: + type: string + example: "1000000" + treasury_account_id: + $ref: "#/components/schemas/EntityId" + type: + type: string + enum: [FUNGIBLE_COMMON, NON_FUNGIBLE_UNIQUE] + example: FUNGIBLE_COMMON + wipe_key: + $ref: "#/components/schemas/Key" + custom_fees: + $ref: "#/components/schemas/CustomFees" + TokenRelationship: + type: object + properties: + automatic_association: + type: boolean + description: Specifies if the relationship is implicitly/explicitly associated. + example: true + balance: + format: int64 + type: integer + description: For FUNGIBLE_COMMON, the balance that the account holds in the smallest denomination. For NON_FUNGIBLE_UNIQUE, the number of NFTs held by the account. + example: 5 + nullable: false + created_timestamp: + $ref: "#/components/schemas/Timestamp" + decimals: + format: int64 + type: integer + freeze_status: + type: string + description: The Freeze status of the account. + example: UNFROZEN + enum: [NOT_APPLICABLE, FROZEN, UNFROZEN] + kyc_status: + type: string + description: The KYC status of the account. + example: GRANTED + enum: [NOT_APPLICABLE, GRANTED, REVOKED] + token_id: + $ref: "#/components/schemas/EntityId" + required: + - automatic_association + - balance + - created_timestamp + - decimals + - freeze_status + - kyc_status + - token_id + example: + automatic_association: true + balance: 5 + created_timestamp: "123456789.000000001" + decimals: 3 + freeze_status: UNFROZEN + kyc_status: GRANTED + token_id: 0.0.27335 + LogTopicQueryParam: + type: array + items: + type: string + pattern: ^(0x)?[0-9A-Fa-f]{1,64}$ + TransactionTypes: + type: string + enum: + - CONSENSUSCREATETOPIC + - CONSENSUSDELETETOPIC + - CONSENSUSSUBMITMESSAGE + - CONSENSUSUPDATETOPIC + - CONTRACTCALL + - CONTRACTCREATEINSTANCE + - CONTRACTDELETEINSTANCE + - CONTRACTUPDATEINSTANCE + - CRYPTOADDLIVEHASH + - CRYPTOAPPROVEALLOWANCE + - CRYPTOCREATEACCOUNT + - CRYPTODELETE + - CRYPTODELETEALLOWANCE + - CRYPTODELETELIVEHASH + - CRYPTOTRANSFER + - CRYPTOUPDATEACCOUNT + - ETHEREUMTRANSACTION + - FILEAPPEND + - FILECREATE + - FILEDELETE + - FILEUPDATE + - FREEZE + - NODE + - NODECREATE + - NODEDELETE + - NODESTAKEUPDATE + - NODEUPDATE + - SCHEDULECREATE + - SCHEDULEDELETE + - SCHEDULESIGN + - SYSTEMDELETE + - SYSTEMUNDELETE + - TOKENAIRDROP + - TOKENASSOCIATE + - TOKENBURN + - TOKENCANCELAIRDROP + - TOKENCLAIMAIRDROP + - TOKENCREATION + - TOKENDELETION + - TOKENDISSOCIATE + - TOKENFEESCHEDULEUPDATE + - TOKENFREEZE + - TOKENGRANTKYC + - TOKENMINT + - TOKENPAUSE + - TOKENREJECT + - TOKENREVOKEKYC + - TOKENUNFREEZE + - TOKENUNPAUSE + - TOKENUPDATE + - TOKENUPDATENFTS + - TOKENWIPE + - UNCHECKEDSUBMIT + - UNKNOWN + - UTILPRNG + Tokens: + type: array + items: + $ref: "#/components/schemas/Token" + Topic: + type: object + properties: + admin_key: + $ref: "#/components/schemas/Key" + auto_renew_account: + $ref: "#/components/schemas/EntityId" + auto_renew_period: + description: The amount of time to attempt to extend the topic's lifetime after expiration. + example: 7776000 + format: int64 + nullable: true + type: integer + created_timestamp: + $ref: "#/components/schemas/TimestampNullable" + deleted: + description: Whether the topic is deleted or not. + example: false + nullable: true + type: boolean + memo: + description: The memo associated with the topic. + example: topic memo + type: string + submit_key: + $ref: "#/components/schemas/Key" + timestamp: + $ref: "#/components/schemas/TimestampRange" + topic_id: + $ref: "#/components/schemas/EntityId" + required: + - admin_key + - auto_renew_account + - auto_renew_period + - created_timestamp + - deleted + - memo + - submit_key + - timestamp + - topic_id + TopicMessage: + type: object + properties: + chunk_info: + $ref: "#/components/schemas/ChunkInfo" + consensus_timestamp: + $ref: "#/components/schemas/Timestamp" + message: + type: string + payer_account_id: + $ref: "#/components/schemas/EntityId" + running_hash: + type: string + format: byte + running_hash_version: + format: int32 + type: integer + sequence_number: + format: int64 + type: integer + topic_id: + $ref: "#/components/schemas/EntityId" + required: + - consensus_timestamp + - message + - payer_account_id + - running_hash + - running_hash_version + - sequence_number + - topic_id + example: + chunk_info: + initial_transaction_id: "0.0.10-1234567890-000000321" + nonce: 3 + number: 1 + total: 2 + scheduled: true + consensus_timestamp: "1234567890.000000001" + message: bWVzc2FnZQ== + payer_account_id: 0.0.10 + running_hash: cnVubmluZ19oYXNo + running_hash_version: 2 + sequence_number: 1 + topic_id: 0.0.7 + TopicMessages: + type: array + items: + $ref: "#/components/schemas/TopicMessage" + Transaction: + type: object + properties: + bytes: + type: string + format: byte + nullable: true + charged_tx_fee: + format: int64 + type: integer + consensus_timestamp: + $ref: "#/components/schemas/Timestamp" + entity_id: + $ref: "#/components/schemas/EntityId" + max_fee: + type: string + memo_base64: + format: byte + nullable: true + type: string + name: + $ref: "#/components/schemas/TransactionTypes" + nft_transfers: + type: array + items: + type: object + properties: + is_approval: + type: boolean + receiver_account_id: + $ref: "#/components/schemas/EntityId" + sender_account_id: + $ref: "#/components/schemas/EntityId" + serial_number: + example: 1 + format: int64 + type: integer + token_id: + $ref: "#/components/schemas/EntityId" + required: + - is_approval + - receiver_account_id + - sender_account_id + - token_id + - serial_number + node: + $ref: "#/components/schemas/EntityId" + nonce: + type: integer + minimum: 0 + parent_consensus_timestamp: + $ref: "#/components/schemas/TimestampNullable" + result: + type: string + scheduled: + type: boolean + staking_reward_transfers: + $ref: "#/components/schemas/StakingRewardTransfers" + token_transfers: + type: array + items: + type: object + properties: + token_id: + $ref: "#/components/schemas/EntityId" + account: + $ref: "#/components/schemas/EntityId" + amount: + format: int64 + type: integer + is_approval: + type: boolean + required: + - token_id + - account + - amount + transaction_hash: + type: string + format: byte + transaction_id: + type: string + transfers: + type: array + items: + type: object + properties: + account: + $ref: "#/components/schemas/EntityId" + amount: + format: int64 + type: integer + is_approval: + type: boolean + required: + - account + - amount + valid_duration_seconds: + type: string + valid_start_timestamp: + $ref: "#/components/schemas/Timestamp" + example: + bytes: null + charged_tx_fee: 7 + consensus_timestamp: "1234567890.000000007" + entity_id: "0.0.2281979" + max_fee: 33 + memo_base64: null + name: CRYPTOTRANSFER + nft_transfers: + - is_approval: true + receiver_account_id: 0.0.121 + sender_account_id: 0.0.122 + serial_number: 1 + token_id: 0.0.123 + - is_approval: true + receiver_account_id: 0.0.321 + sender_account_id: 0.0.422 + serial_number: 2 + token_id: 0.0.123 + node: 0.0.3 + nonce: 0 + parent_consensus_timestamp: "1234567890.000000007" + result: SUCCESS + scheduled: false + staking_reward_transfers: + - account: 3 + amount: 150 + - account: 9 + amount: 200 + transaction_hash: "vigzKe2J7fv4ktHBbNTSzQmKq7Lzdq1/lJMmHT+a2KgvdhAuadlvS4eKeqKjIRmW" + transaction_id: 0.0.8-1234567890-000000006 + token_transfers: + - token_id: 0.0.90000 + account: 0.0.9 + amount: 1200 + is_approval: false + - token_id: 0.0.90000 + account: 0.0.8 + amount: -1200 + is_approval: false + transfers: + - account: 0.0.3 + amount: 2 + is_approval: false + - account: 0.0.8 + amount: -3 + is_approval: false + - account: 0.0.98 + amount: 1 + is_approval: false + - account: 0.0.800 + amount: 150 + is_approval: false + - account: 0.0.800 + amount: 200 + is_approval: false + valid_duration_seconds: 11 + valid_start_timestamp: "1234567890.000000006" + TransactionDetail: + allOf: + - $ref: "#/components/schemas/Transaction" + - type: object + properties: + assessed_custom_fees: + type: array + items: + $ref: "#/components/schemas/AssessedCustomFee" + example: + assessed_custom_fees: + - amount: 100 + collector_account_id: 0.0.10 + effective_payer_account_ids: + - 0.0.8 + - 0.0.72 + token_id: 0.0.90001 + bytes: null + charged_tx_fee: 7 + consensus_timestamp: "1234567890.000000007" + entity_id: "0.0.2281979" + max_fee: 33 + memo_base64: null + name: CRYPTOTRANSFER + nft_transfers: + - is_approval: true + receiver_account_id: 0.0.121 + sender_account_id: 0.0.122 + serial_number: 1 + token_id: 0.0.123 + - is_approval: true + receiver_account_id: 0.0.321 + sender_account_id: 0.0.422 + serial_number: 2 + token_id: 0.0.123 + node: 0.0.3 + nonce: 0 + parent_consensus_timestamp: "1234567890.000000007" + result: SUCCESS + scheduled: false + staking_reward_transfers: + - account: 3 + amount: 200 + - account: 9 + amount: 300 + transaction_hash: "vigzKe2J7fv4ktHBbNTSzQmKq7Lzdq1/lJMmHT+a2KgvdhAuadlvS4eKeqKjIRmW" + transaction_id: 0.0.8-1234567890-000000006 + token_transfers: + - token_id: 0.0.90000 + account: 0.0.9 + amount: 1200 + is_approval: true + - token_id: 0.0.90000 + account: 0.0.8 + amount: -1200 + is_approval: true + transfers: + - account: 0.0.3 + amount: 2 + is_approval: true + - account: 0.0.8 + amount: -3 + is_approval: true + - account: 0.0.98 + amount: 1 + is_approval: true + - account: 0.0.800 + amount: 200 + is_approval: false + - account: 0.0.800 + amount: 300 + is_approval: false + valid_duration_seconds: 11 + valid_start_timestamp: "1234567890.000000006" + TransactionDetails: + type: array + items: + $ref: "#/components/schemas/TransactionDetail" + TransactionId: + type: object + properties: + account_id: + $ref: "#/components/schemas/EntityId" + nonce: + example: 0 + format: int32 + type: integer + minimum: 0 + nullable: true + scheduled: + example: false + type: boolean + nullable: true + transaction_valid_start: + $ref: "#/components/schemas/Timestamp" + TransactionIdStr: + type: string + description: A transaction id in string format. + pattern: '^(\d+)\.(\d+)\.(\d+)-(\d{1,19})-(\d{1,9})$' + Transactions: + type: array + items: + $ref: "#/components/schemas/Transaction" + responses: + NotFoundError: + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + example: + _status: + messages: + - message: Not found + TopicNotFound: + description: Topic Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + example: + _status: + messages: + - message: No such topic id - 7 + TransactionNotFound: + description: Transaction Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + example: + _status: + messages: + - message: Transaction not found + InvalidParameterError: + description: Invalid parameter + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + example: + _status: + messages: + - message: "Invalid parameter: account.id" + - message: Invalid Transaction id. Please use \shard.realm.num-sss-nnn\ format where sss are seconds and nnn are nanoseconds + ServiceUnavailableError: + description: Service Unavailable + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + example: + _status: + messages: + - message: Require at least 1/3 signature files to prove consensus, got 1 out of 4 for file 2019-10-11T13_33_25.526889Z.rcd_sig + parameters: + accountIdOrAliasOrEvmAddressPathParam: + name: idOrAliasOrEvmAddress + in: path + description: Account alias or account id or evm address + required: true + examples: + aliasOnly: + value: HIQQEXWKW53RKN4W6XXC4Q232SYNZ3SZANVZZSUME5B5PRGXL663UAQA + realmAlias: + value: 0.HIQQEXWKW53RKN4W6XXC4Q232SYNZ3SZANVZZSUME5B5PRGXL663UAQA + shardRealmAlias: + value: 0.1.HIQQEXWKW53RKN4W6XXC4Q232SYNZ3SZANVZZSUME5B5PRGXL663UAQA + accountNumOnly: + value: 8 + realmAccountNum: + value: 0.8 + shardRealmAccountNum: + value: 0.0.8 + evmAddress: + value: ac384c53f03855fa1b3616052f8ba32c6c2a2fec + evmAddressWithPrefix: + value: 0xac384c53f03855fa1b3616052f8ba32c6c2a2fec + evmAddressWithShardAndRealm: + value: 0.0.ac384c53f03855fa1b3616052f8ba32c6c2a2fec + schema: + pattern: ^(\d{1,10}\.){0,2}(\d{1,10}|(0x)?[A-Fa-f0-9]{40}|(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8}))$ + type: string + accountIdOrAliasOrEvmAddressQueryParam: + name: account.id + in: query + description: Account id or account alias with no shard realm or evm address with no shard realm + examples: + aliasOnly: + value: HIQQEXWKW53RKN4W6XXC4Q232SYNZ3SZANVZZSUME5B5PRGXL663UAQA + accountNumOnly: + value: 8 + realmAccountNum: + value: 0.8 + shardRealmAccountNum: + value: 0.0.8 + evmAddress: + value: ac384c53f03855fa1b3616052f8ba32c6c2a2fec + evmAddressWithPrefix: + value: 0xac384c53f03855fa1b3616052f8ba32c6c2a2fec + schema: + pattern: ^(\d{1,10}\.){0,2}(\d{1,10}|(0x)?[A-Fa-f0-9]{40}|(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8}))$ + type: string + accountBalanceQueryParam: + name: account.balance + in: query + description: The optional balance value to compare against + explode: true + examples: + noValue: + summary: -- + value: "" + noOperator: + summary: Example of equals with no operator + value: 100 + eqOperator: + summary: Example of equals operator + value: eq:200 + neOperator: + summary: Example of not equals operator + value: ne:300 + gtOperator: + summary: Example of greater than operator + value: gt:400 + gteOperator: + summary: Example of greater than or equals operator + value: gte:500 + ltOperator: + summary: Example of less than operator + value: lt:600 + lteOperator: + summary: Example of less than or equals operator + value: lte:700 + schema: + type: string + pattern: ^((gte?|lte?|eq|ne)\:)?\d{1,10}$ + accountIdQueryParam: + name: account.id + in: query + description: The ID of the account to return information for + explode: true + examples: + noValue: + summary: -- + value: "" + entityNumNoOperator: + summary: Example of entityNum equals with no operator + value: 100 + idNoOperator: + summary: Example of id equals with no operator + value: 0.0.100 + entityNumEqOperator: + summary: Example of entityNum equals operator + value: eq:200 + idEqOperator: + summary: Example of id equals operator + value: eq:0.0.200 + entityNumNeOperator: + summary: Example of entityNum not equals operator + value: ne:300 + idNeOperator: + summary: Example of id not equals operator + value: ne:0.0.300 + entityNumGtOperator: + summary: Example of entityNum greater than operator + value: gt:400 + idGtOperator: + summary: Example of id greater than operator + value: gt:0.0.400 + entityNumGteOperator: + summary: Example of entityNum greater than or equals operator + value: gte:500 + idGteOperator: + summary: Example of id greater than or equals operator + value: gte:0.0.500 + entityNumLtOperator: + summary: Example of entityNum less than operator + value: lt:600 + idLtOperator: + summary: Example of id less than operator + value: lt:0.0.600 + entityNumLteOperator: + summary: Example of entityNum less than or equals operator + value: lte:700 + idLteOperator: + summary: Example of id less than or equals operator + value: lte:0.0.700 + schema: + $ref: "#/components/schemas/EntityIdQuery" + accountPublicKeyQueryParam: + name: account.publickey + in: query + description: The account's public key to compare against + example: 3c3d546321ff6f63d701d2ec5c277095874e19f4a235bee1e6bb19258bf362be + schema: + type: string + balanceQueryParam: + name: balance + in: query + description: >- + Whether to include balance information or not. If included, token balances are limited to at most 50 per + account as outlined in HIP-367. If multiple values are provided the last value will be the only value used. + example: true + schema: + type: boolean + default: true + contractIdQueryParam: + name: contract.id + description: The ID of the smart contract + in: query + examples: + noValue: + summary: -- + value: "" + entityNumNoOperator: + summary: Example of entityNum equals with no operator + value: 100 + idNoOperator: + summary: Example of id equals with no operator + value: 0.0.100 + evmAddressNoOperator: + summary: A hex encoded EVM address with no operator. + value: 0.0.1d8bfdc5d46dc4f61d6b6115972536ebe6a8854c + entityNumEqOperator: + summary: Example of entityNum equals operator + value: eq:200 + idEqOperator: + summary: Example of id equals operator + value: eq:0.0.200 + entityNumNeOperator: + summary: Example of entityNum not equals operator + value: ne:300 + idNeOperator: + summary: Example of id not equals operator + value: ne:0.0.300 + entityNumGtOperator: + summary: Example of entityNum greater than operator + value: gt:400 + idGtOperator: + summary: Example of id greater than operator + value: gt:0.0.400 + entityNumGteOperator: + summary: Example of entityNum greater than or equals operator + value: gte:500 + idGteOperator: + summary: Example of id greater than or equals operator + value: gte:0.0.500 + entityNumLtOperator: + summary: Example of entityNum less than operator + value: lt:600 + idLtOperator: + summary: Example of id less than operator + value: lt:0.0.600 + entityNumLteOperator: + summary: Example of entityNum less than or equals operator + value: lte:700 + idLteOperator: + summary: Example of id less than or equals operator + value: lte:0.0.700 + schema: + pattern: ^((gte?|lte?|eq|ne)\:)?(\d{1,10}\.\d{1,10}\.)?\d{1,10}|(\d{1,10}\.){0,2}[A-Fa-f0-9]{40}$ + type: string + contractIdOrAddressPathParam: + name: contractIdOrAddress + in: path + required: true + description: The ID or hex encoded EVM address (with or without 0x prefix) associated with this contract. + schema: + pattern: ^(\d{1,10}\.){0,2}(\d{1,10}|(0x)?[A-Fa-f0-9]{40})$ + type: string + hashOrNumberPathParam: + name: hashOrNumber + in: path + required: true + description: Accepts both eth and hedera hash format or block number + schema: + pattern: ^(\d{1,10}|(0x)?([A-Fa-f0-9]{64}|[A-Fa-f0-9]{96}))$ + type: string + entityIdPathParam: + name: entityId + in: path + required: true + description: Entity id + schema: + $ref: "#/components/schemas/EntityId" + fileIdQueryParam: + name: file.id + description: The ID of the file entity + in: query + examples: + noValue: + summary: -- + value: "" + entityNumNoOperator: + summary: Example of entityNum equals with no operator + value: 100 + idNoOperator: + summary: Example of id equals with no operator + value: 0.0.100 + entityNumEqOperator: + summary: Example of entityNum equals operator + value: eq:200 + idEqOperator: + summary: Example of id equals operator + value: eq:0.0.200 + schema: + $ref: "#/components/schemas/EntityIdQuery" + scheduleIdPathParam: + name: scheduleId + in: path + required: true + description: Schedule id + schema: + $ref: "#/components/schemas/EntityId" + tokenIdPathParam: + name: tokenId + in: path + required: true + description: Token id + schema: + $ref: "#/components/schemas/EntityId" + topicIdPathParam: + name: topicId + in: path + required: true + description: Topic id + schema: + $ref: "#/components/schemas/EntityId" + fromQueryParam: + name: from + in: query + description: Account ID or EVM address executing the contract + schema: + pattern: ^\d{1,10}\.\d{1,10}\.\d{1,10}|(0x)?[A-Fa-f0-9]{40}$ + type: string + logIndexQueryParam: + name: index + in: query + description: Contract log index + schema: + type: string + pattern: ^((eq|gt|gte|lt|lte):)?\d{1,10}$ + examples: + noValue: + summary: -- + value: "" + indexNoOperator: + summary: Example of index equals with no operator + value: 2 + indexEqOperator: + summary: Example of index equals with operator + value: eq:2 + indexGtOperator: + summary: Example of index greater than operator + value: gt:2 + indexGteOperator: + summary: Example of index greater than or equals operator + value: gte:2 + indexLtOperator: + summary: Example of index less than operator + value: lt:2 + indexLteOperator: + summary: Example of index less than or equals operator + value: lte:2 + limitQueryParam: + name: limit + in: query + description: The maximum number of items to return + example: 2 + schema: + format: int32 + type: integer + default: 25 + minimum: 1 + maximum: 100 + blockNumberQueryParam: + name: block.number + in: query + description: The block's number + examples: + noValue: + summary: -- + value: "" + noOperator: + summary: Example of block.number equals with no operator + value: 1 + eqOperator: + summary: Example of block.number equals operator + value: eq:2 + gtOperator: + summary: Example of block.number greater than operator + value: gt:3 + gteOperator: + summary: Example of block.number greater than or equals operator + value: gte:4 + ltOperator: + summary: Example of block.number less than operator + value: lt:5 + lteOperator: + summary: Example of block.number less than or equals operator + value: lte:6 + schema: + type: string + pattern: ^((eq|gt|gte|lt|lte):)?\d{1,19}$ + minimum: 0 + nodeIdQueryParam: + name: node.id + description: The ID of the node + in: query + examples: + noValue: + summary: -- + value: "" + serialNumNoOperator: + summary: Example of nodeId equals with no operator + value: 1 + serialNumEqOperator: + summary: Example of nodeId equals operator + value: eq:2 + serialNumGtOperator: + summary: Example of nodeId greater than operator + value: gt:3 + serialNumGteOperator: + summary: Example of nodeId greater than or equals operator + value: gte:4 + serialNumLtOperator: + summary: Example of nodeId less than operator + value: lt:5 + serialNumLteOperator: + summary: Example of nodeId less than or equals operator + value: lte:6 + schema: + type: string + pattern: ^((eq|gt|gte|lt|lte):)?\d{1,19}$ + nonceQueryParam: + name: nonce + in: query + description: >- + Filter the query result by the nonce of the transaction. A zero nonce represents user submitted transactions + while a non-zero nonce is generated by main nodes. The filter honors the last value. If not specified, + all transactions with specified payer account ID and valid start timestamp match. If multiple values are + provided the last value will be the only value used. + example: 0 + schema: + format: int32 + type: integer + minimum: 0 + nonceQueryParamWithDefault: + name: nonce + in: query + description: >- + Filter the query result by the nonce of the transaction. A zero nonce represents user submitted transactions + while a non-zero nonce is generated by main nodes. The filter honors the last value. Default is 0 when + not specified. + example: 1 + schema: + format: int32 + type: integer + default: 0 + minimum: 0 + orderQueryParam: + name: order + in: query + description: The order in which items are listed + example: desc + schema: + enum: [asc, desc] + default: asc + orderQueryParamDesc: + name: order + in: query + description: The order in which items are listed + example: asc + schema: + enum: [asc, desc] + default: desc + ownerQueryParam: + name: owner + description: When the owner value is true or omitted, the accountId path parameter will specify the ID of the owner, and the API will retrieve the allowances that the owner has granted to different spenders. Conversely, when the owner value is false, the accountId path parameter will indicate the ID of the spender who has an allowance, and the API will instead provide the allowances granted to the spender by different owners of those tokens. + in: query + example: true + schema: + type: boolean + default: true + publicKeyQueryParam: + name: publickey + in: query + description: The public key to compare against + example: 3c3d546321ff6f63d701d2ec5c277095874e19f4a235bee1e6bb19258bf362be + schema: + type: string + receiverIdQueryParam: + name: receiver.id + description: The ID of the receiver to return information for + in: query + examples: + noValue: + summary: -- + value: "" + entityNumNoOperator: + summary: Example of entityNum equals with no operator + value: 100 + idNoOperator: + summary: Example of id equals with no operator + value: 0.0.100 + entityNumEqOperator: + summary: Example of entityNum equals operator + value: eq:200 + idEqOperator: + summary: Example of id equals operator + value: eq:0.0.200 + idGtOperator: + summary: Example of id greather than operator + value: gt:0.0.200 + idGteOperator: + summary: Example of id greather than or equal to operator + value: gte:0.0.200 + idLtOperator: + summary: Example of id less than operator + value: lt:0.0.200 + idLteOperator: + summary: Example of id less than or equal to operator + value: lte:0.0.200 + schema: + $ref: "#/components/schemas/EntityIdQuery" + scheduledQueryParam: + name: scheduled + in: query + description: >- + Filter transactions by the scheduled flag. If true, return information for the scheduled transaction. If false, + return information for the non-scheduled transaction. If not present, return information for all transactions + matching transactionId. If multiple values are provided the last value will be the only value used. + schema: + type: boolean + scheduledQueryParamWithDefault: + name: scheduled + in: query + description: >- + Filter transactions by the scheduled flag. If true, return information for the scheduled transaction. + If false, return information for the non-scheduled transaction. + schema: + type: boolean + default: false + scheduleIdQueryParam: + name: schedule.id + description: The ID of the schedule to return information for + in: query + examples: + noValue: + summary: -- + value: "" + entityNumNoOperator: + summary: Example of entityNum equals with no operator + value: 100 + idNoOperator: + summary: Example of id equals with no operator + value: 0.0.100 + entityNumEqOperator: + summary: Example of entityNum equals operator + value: eq:200 + idEqOperator: + summary: Example of id equals operator + value: eq:0.0.200 + entityNumNeOperator: + summary: Example of entityNum not equals operator + value: ne:300 + idNeOperator: + summary: Example of id not equals operator + value: ne:0.0.300 + entityNumGtOperator: + summary: Example of entityNum greater than operator + value: gt:400 + idGtOperator: + summary: Example of id greater than operator + value: gt:0.0.400 + entityNumGteOperator: + summary: Example of entityNum greater than or equals operator + value: gte:500 + idGteOperator: + summary: Example of id greater than or equals operator + value: gte:0.0.500 + entityNumLtOperator: + summary: Example of entityNum less than operator + value: lt:600 + idLtOperator: + summary: Example of id less than operator + value: lt:0.0.600 + entityNumLteOperator: + summary: Example of entityNum less than or equals operator + value: lte:700 + idLteOperator: + summary: Example of id less than or equals operator + value: lte:0.0.700 + schema: + $ref: "#/components/schemas/EntityIdQuery" + senderIdQueryParam: + name: sender.id + description: The ID of the sender to return information for + in: query + examples: + noValue: + summary: -- + value: "" + entityNumNoOperator: + summary: Example of entityNum equals with no operator + value: 100 + idNoOperator: + summary: Example of id equals with no operator + value: 0.0.100 + entityNumEqOperator: + summary: Example of entityNum equals operator + value: eq:200 + idEqOperator: + summary: Example of id equals operator + value: eq:0.0.200 + idGtOperator: + summary: Example of id greather than operator + value: gt:0.0.200 + idGteOperator: + summary: Example of id greather than or equal to operator + value: gte:0.0.200 + idLtOperator: + summary: Example of id less than operator + value: lt:0.0.200 + idLteOperator: + summary: Example of id less than or equal to operator + value: lte:0.0.200 + schema: + $ref: "#/components/schemas/EntityIdQuery" + serialNumberPathParam: + name: serialNumber + in: path + required: true + description: The nft serial number + example: 1 + schema: + type: integer + format: int64 + default: 1 + minimum: 1 + maximum: 9223372036854775807 + serialNumberQueryParam: + name: serialnumber + in: query + explode: true + description: The nft serial number (64 bit type). Requires a tokenId value also be populated. + examples: + noValue: + summary: -- + value: "" + serialNumNoOperator: + summary: Example of serialNum equals with no operator + value: 100 + serialNumEqOperator: + summary: Example of serialNum equals operator + value: eq:200 + serialNumGtOperator: + summary: Example of serialNum greater than operator + value: gt:400 + serialNumGteOperator: + summary: Example of serialNum greater than or equals operator + value: gte:500 + serialNumLtOperator: + summary: Example of serialNum less than operator + value: lt:600 + serialNumLteOperator: + summary: Example of serialNum less than or equals operator + value: lte:700 + schema: + type: string + pattern: ^((eq|gt|gte|lt|lte):)?\d{1,19}?$ + timestampQueryParam: + description: The consensus timestamp as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time. + name: timestamp + in: query + explode: true + examples: + noValue: + summary: -- + value: "" + secondsNoOperator: + summary: Example of seconds equals with no operator + value: 1234567890 + timestampNoOperator: + summary: Example of timestamp equals with no operator + value: 1234567890.000000100 + secondsEqOperator: + summary: Example of seconds equals with operator + value: eq:1234567890 + timestampEqOperator: + summary: Example of timestamp equals with operator + value: eq:1234567890.000000200 + secondsNeOperator: + summary: Example of seconds not equals operator + value: ne:1234567890 + timestampNeOperator: + summary: Example of timestamp not equals operator + value: ne:1234567890.000000300 + secondsGtOperator: + summary: Example of seconds greater than operator + value: gt:1234567890 + timestampGtOperator: + summary: Example of timestamp greater than operator + value: gt:1234567890.000000400 + secondsGteOperator: + summary: Example of seconds greater than or equals operator + value: gte:1234567890 + timestampGteOperator: + summary: Example of timestamp greater than or equals operator + value: gte:1234567890.000000500 + secondsLtOperator: + summary: Example of seconds less than operator + value: lt:1234567890 + timestampLtOperator: + summary: Example of timestamp less than operator + value: lt:1234567890.000000600 + secondsLteOperator: + summary: Example of seconds less than or equals operator + value: lte:1234567890 + timestampLteOperator: + summary: Example of timestamp less than or equals operator + value: lte:1234567890.000000700 + schema: + type: array + items: + type: string + pattern: ^((eq|gt|gte|lt|lte|ne):)?\d{1,10}(.\d{1,9})?$ + timestampPathParam: + name: timestamp + in: path + description: The Unix timestamp in seconds.nanoseconds format, the timestamp at which the associated transaction reached consensus. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time. + required: true + example: 1234567890.000000700 + schema: + type: string + pattern: ^\d{1,10}(.\d{1,9})?$ + stateTimestampQueryParam: + description: The consensus timestamp of the contract state as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time. + name: timestamp + in: query + explode: true + examples: + noValue: + summary: -- + value: "" + secondsNoOperator: + summary: Example of seconds equals with no operator + value: 1234567890 + timestampNoOperator: + summary: Example of timestamp equals with no operator + value: 1234567890.000000100 + secondsEqOperator: + summary: Example of seconds equals with operator + value: eq:1234567890 + timestampEqOperator: + summary: Example of timestamp equals with operator + value: eq:1234567890.000000200 + secondsGtOperator: + summary: Example of seconds greater than operator + value: gt:1234567890 + timestampGtOperator: + summary: Example of timestamp greater than operator + value: gt:1234567890.000000400 + secondsGteOperator: + summary: Example of seconds greater than or equals operator + value: gte:1234567890 + timestampGteOperator: + summary: Example of timestamp greater than or equals operator + value: gte:1234567890.000000500 + secondsLtOperator: + summary: Example of seconds less than operator + value: lt:1234567890 + timestampLtOperator: + summary: Example of timestamp less than operator + value: lt:1234567890.000000600 + secondsLteOperator: + summary: Example of seconds less than or equals operator + value: lte:1234567890 + timestampLteOperator: + summary: Example of timestamp less than or equals operator + value: lte:1234567890.000000700 + schema: + type: array + items: + type: string + pattern: ^((eq|gt|gte|lt|lte):)?\d{1,10}(.\d{1,9})?$ + tokenInfoTimestampQueryParam: + description: The Unix timestamp in seconds.nanoseconds format. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time. + name: timestamp + in: query + explode: true + examples: + noValue: + summary: -- + value: "" + secondsNoOperator: + summary: Example of seconds equals with no operator + value: 1234567890 + timestampNoOperator: + summary: Example of timestamp equals with no operator + value: 1234567890.000000100 + secondsEqOperator: + summary: Example of seconds equals with operator + value: eq:1234567890 + timestampEqOperator: + summary: Example of timestamp equals with operator + value: eq:1234567890.000000200 + secondsLtOperator: + summary: Example of seconds less than operator + value: lt:1234567890 + timestampLtOperator: + summary: Example of timestamp less than operator + value: lt:1234567890.000000600 + secondsLteOperator: + summary: Example of seconds less than or equals operator + value: lte:1234567890 + timestampLteOperator: + summary: Example of timestamp less than or equals operator + value: lte:1234567890.000000700 + schema: + type: string + pattern: ^((eq|lt|lte):)?\d{1,10}(.\d{1,9})?$ + logTopic0QueryParam: + name: topic0 + in: query + explode: true + description: The first topic associated with a contract log. Requires a timestamp range also be populated. + schema: + $ref: "#/components/schemas/LogTopicQueryParam" + logTopic1QueryParam: + name: topic1 + in: query + description: The second topic associated with a contract log. Requires a timestamp range also be populated. + schema: + $ref: "#/components/schemas/LogTopicQueryParam" + logTopic2QueryParam: + name: topic2 + in: query + description: The third topic associated with a contract log. Requires a timestamp range also be populated. + schema: + $ref: "#/components/schemas/LogTopicQueryParam" + logTopic3QueryParam: + name: topic3 + in: query + description: The fourth topic associated with a contract log. Requires a timestamp range also be populated. + schema: + $ref: "#/components/schemas/LogTopicQueryParam" + spenderIdQueryParam: + name: spender.id + description: The ID of the spender to return information for + in: query + examples: + noValue: + summary: -- + value: "" + entityNumNoOperator: + summary: Example of entityNum equals with no operator + value: 100 + idNoOperator: + summary: Example of id equals with no operator + value: 0.0.100 + entityNumEqOperator: + summary: Example of entityNum equals operator + value: eq:200 + idEqOperator: + summary: Example of id equals operator + value: eq:0.0.200 + idGtOperator: + summary: Example of id greather than operator + value: gt:0.0.200 + idGteOperator: + summary: Example of id greather than or equal to operator + value: gte:0.0.200 + idLtOperator: + summary: Example of id less than operator + value: lt:0.0.200 + idLteOperator: + summary: Example of id less than or equal to operator + value: lte:0.0.200 + schema: + $ref: "#/components/schemas/EntityIdQuery" + memory: + name: memory + description: If provided and set to true, memory information will be included in the response + in: query + example: false + schema: + type: boolean + default: false + stack: + name: stack + description: If provided and set to false, stack information will not be included in the response + in: query + example: true + schema: + type: boolean + default: true + storage: + name: storage + description: If provided and set to true, storage information will be included in the response + in: query + example: false + schema: + type: boolean + default: false + transactionsQueryParam: + name: transactions + description: If provided and set to false transactions will not be included in the response + in: query + example: true + schema: + type: boolean + default: true + transactionTypeQueryParam: + name: transactiontype + in: query + example: cryptotransfer + schema: + $ref: "#/components/schemas/TransactionTypes" + transactionIdPathParam: + name: transactionId + in: path + required: true + description: Transaction id + example: 0.0.10-1234567890-000000000 + schema: + type: string + tokenIdQueryParam: + name: token.id + description: The ID of the token to return information for + in: query + examples: + noValue: + summary: -- + value: "" + entityNumNoOperator: + summary: Example of entityNum equals with no operator + value: 100 + idNoOperator: + summary: Example of id equals with no operator + value: 0.0.100 + entityNumEqOperator: + summary: Example of entityNum equals operator + value: eq:200 + idEqOperator: + summary: Example of id equals operator + value: eq:0.0.200 + entityNumNeOperator: + summary: Example of entityNum not equals operator + value: ne:300 + idNeOperator: + summary: Example of id not equals operator + value: ne:0.0.300 + entityNumGtOperator: + summary: Example of entityNum greater than operator + value: gt:400 + idGtOperator: + summary: Example of id greater than operator + value: gt:0.0.400 + entityNumGteOperator: + summary: Example of entityNum greater than or equals operator + value: gte:500 + idGteOperator: + summary: Example of id greater than or equals operator + value: gte:0.0.500 + entityNumLtOperator: + summary: Example of entityNum less than operator + value: lt:600 + idLtOperator: + summary: Example of id less than operator + value: lt:0.0.600 + entityNumLteOperator: + summary: Example of entityNum less than or equals operator + value: lte:700 + idLteOperator: + summary: Example of id less than or equals operator + value: lte:0.0.700 + schema: + $ref: "#/components/schemas/EntityIdQuery" + tokenNameQueryParam: + name: name + in: query + description: Partial or full token name. Not allowed to be used with token.id or account.id parameter. Pagination is not supported with the use of this parameter and results are ordered by token.id with respect to the order parameter. + schema: + type: string + maxLength: 100 + minLength: 3 + + tokenTypeQueryParam: + name: type + in: query + example: + - ALL + - FUNGIBLE_COMMON + - NON_FUNGIBLE_UNIQUE + explode: true + schema: + type: array + items: + type: string + contractActionsIndexQueryParam: + name: index + in: query + description: The index of a contract action + explode: true + examples: + noValue: + summary: -- + value: "" + noOperator: + summary: Example of equals with no operator + value: 1 + eqOperator: + summary: Example of equals operator + value: eq:2 + gtOperator: + summary: Example of greater than operator + value: gt:4 + gteOperator: + summary: Example of greater than or equals operator + value: gte:5 + ltOperator: + summary: Example of less than operator + value: lt:6 + lteOperator: + summary: Example of less than or equals operator + value: lte:7 + schema: + type: string + pattern: ^((gte?|lte?|eq|ne)\:)?\d{1,10}$ + contractsBlockNumberQueryParam: + name: block.number + in: query + description: The block's number + examples: + noValue: + summary: -- + value: "" + noOperator: + summary: Example of block.number equals with no operator + value: 1 + eqOperator: + summary: Example of block.number equals operator + value: eq:2 + hexEncoded: + summary: Example of hex encoded block.number equals with no operator + value: "0xa0" + hexEncodedEqOperator: + summary: Example of hex encoded block.number equals with equals operator + value: eq:0xa0 + schema: + type: string + pattern: ^(eq:)?(\d{1,19}|0x[a-fA-f0-9]+)$ + minimum: 0 + slotQueryParam: + name: slot + in: query + description: The slot's number + examples: + noValue: + summary: -- + value: "" + noOperator: + summary: Example of slot equals with no operator + value: 1 + eqOperator: + summary: Example of slot equals operator + value: eq:2 + gtOperator: + summary: Example of slot gt operator + value: gt:2 + gteOperator: + summary: Example of slot gte operator + value: gte:2 + ltOperator: + summary: Example of slot lt operator + value: lt:2 + lteOperator: + summary: Example of slot lte operator + value: lte:2 + schema: + type: string + pattern: ^((eq|gte?|lte?)\:)?(0x)?[0-9A-Fa-f]{1,64}$ + blockHashQueryParam: + name: block.hash + in: query + description: The block's hash. If multiple values are provided the last value will be the only value used. + examples: + noValue: + summary: -- + value: "" + 32ByteNoOperator: + summary: Example of 32 byte block.hash equals with no operator + value: ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef + 48ByteNoOperator: + summary: Example of 48 byte block.hash equals with no operator + value: 1eaf1abbd64bbcac7f473f0272671c66d3d1d64f584112b11cd4d2063e736305312fcb305804a48baa41571e71c39c61 + 32ByteEqOperator: + summary: Example of 32 byte block.hash with equals operator + value: eq:ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef + 48ByteEqOperator: + summary: Example of 48 byte block.hash with equals operator + value: eq:1eaf1abbd64bbcac7f473f0272671c66d3d1d64f584112b11cd4d2063e736305312fcb305804a48baa41571e71c39c61 + 32Byte0xPrefixNoOperator: + summary: Example of 32 byte block.hash equals with 0x prefix and no operator + value: "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" + 48Byte0xPrefixNoOperator: + summary: Example of 48 byte block.hash equals with 0x prefix and no operator + value: "0x1eaf1abbd64bbcac7f473f0272671c66d3d1d64f584112b11cd4d2063e736305312fcb305804a48baa41571e71c39c61" + 32Byte0xPrefixEqOperator: + summary: Example of 32 byte block.hash with 0x prefix and equals operator + value: eq:0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef + 48Byte0xPrefixEqOperator: + summary: Example of 48 byte block.hash with 0x prefix and equals operator + value: eq:0x1eaf1abbd64bbcac7f473f0272671c66d3d1d64f584112b11cd4d2063e736305312fcb305804a48baa41571e71c39c61 + schema: + type: string + pattern: ^(eq:)?(0x)?([0-9A-Fa-f]{64}|[0-9A-Fa-f]{96})$ + transactionIndexQueryParam: + name: transaction.index + in: query + description: The transaction index in the block + example: 1 + schema: + format: int32 + minimum: 0 + type: integer + internalQueryParam: + name: internal + in: query + description: Whether to include child transactions or not + example: true + schema: + type: boolean + default: false + transactionHashQueryParam: + name: transaction.hash + in: query + schema: + pattern: ^(eq:)?(0x)?([0-9A-Fa-f]{64}|[0-9A-Fa-f]{96})$ + type: string + required: false + description: A hex encoded 32-byte ethereum transaction hash or 48-byte hedera transaction hash. + examples: + transactionHash: + value: ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef + transactionHashWith0xPrefix: + value: "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" + transactionIdOrEthHashPathParam: + name: transactionIdOrHash + in: path + schema: + pattern: ^(0x)?[A-Fa-f0-9]{64}|(\d{1,10})\.(\d{1,10})\.(\d{1,10})-(\d{1,19})-(\d{1,9})$ + type: string + required: true + description: Transaction Id or a 32 byte hash with optional 0x prefix + examples: + transactionId: + value: 0.0.10-1234567890-000000000 + transactionHash: + value: ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef + transactionHashWith0xPrefix: + value: "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" diff --git a/mirrorNodeClient.js b/mirrorNodeClient.js deleted file mode 100644 index 1d9e4d45..00000000 --- a/mirrorNodeClient.js +++ /dev/null @@ -1,54 +0,0 @@ -import axios from "axios"; - -class MirrorNodeClient { - constructor() { - this.mirrorNodeRestUrl = process.env.MIRROR_NODE_REST_URL; - this.NODE_TIMEOUT = process.env.NODE_TIMEOUT; - } - - async getAccountData(accountId) { - const url = `${this.mirrorNodeRestUrl}/api/v1/accounts/${accountId}`; - return this.retryUntilData(url); - } - - async getBalanceData() { - const url = `${this.mirrorNodeRestUrl}/api/v1/balances`; - return this.retryUntilData(url); - } - - async getTokenData(tokenId) { - const url = `${this.mirrorNodeRestUrl}/api/v1/tokens/${tokenId}`; - return this.retryUntilData(url); - } - - async getTokenRelationships(accountId) { - const url = `${this.mirrorNodeRestUrl}/api/v1/accounts/${accountId}/tokens`; - return this.retryUntilData(url); - } - - async retryUntilData(url) { - const maxRetries = Math.floor(this.NODE_TIMEOUT / 1000); // retry once per second - let retries = 0; - - while (retries < maxRetries) { - try { - const response = await axios.get(url); - - if (response.data) { - return response.data; - } - } catch (error) { - // Uncomment if you want to see the error - // console.error(error); - } - - // If the array is empty, delay for a second before the next try - await new Promise((resolve) => setTimeout(resolve, 1000)); - retries++; - } - - throw new Error("Max retries reached without data"); - } -} - -export default new MirrorNodeClient(); diff --git a/package.json b/package.json index 88fc8bfd..79119b7a 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "scripts": { "test": "mocha --require ts-node/register --require tsconfig-paths/register --recursive 'src/tests/**/*.ts' --reporter mochawesome --exit", "test:file": "mocha --require ts-node/register --require tsconfig-paths/register --reporter mochawesome --exit", + "generate-mirror-node-models": "npx openapi-typescript-codegen --input mirror-node.yaml --output src/utils/models/mirror-node-models", "format": "prettier --write .", "lint": "eslint ." }, diff --git a/src/services/Client.ts b/src/services/Client.ts index 5511855a..ee3bcf7a 100644 --- a/src/services/Client.ts +++ b/src/services/Client.ts @@ -11,7 +11,7 @@ const JSONRPClient = new JSONRPCClient( async (jsonRPCRequest): Promise => { try { const response = await axios.post( - process.env.JSON_RPC_SERVER_URL ?? "http://localhost:8545", + process.env.JSON_RPC_SERVER_URL ?? "http://localhost:8544", jsonRPCRequest, { headers: { diff --git a/src/services/MirrorNodeClient.ts b/src/services/MirrorNodeClient.ts index 13798068..a22408d5 100644 --- a/src/services/MirrorNodeClient.ts +++ b/src/services/MirrorNodeClient.ts @@ -1,6 +1,15 @@ import { fetchData } from "@helpers/fetch-data"; import { retryOnError } from "@helpers/retry-on-error"; +import { + TokenRelationshipResponse, + AccountInfo, + CryptoAllowancesResponse, + NftAllowancesResponse, + Nfts, + TokenInfo, +} from "@models/mirror-node-models"; + class MirrorNodeClient { private mirrorNodeRestUrl: string | undefined; private mirrorNodeRestJavaUrl: string | undefined; @@ -10,51 +19,45 @@ class MirrorNodeClient { this.mirrorNodeRestJavaUrl = process.env.MIRROR_NODE_REST_JAVA_URL; } - // TODO: Get mirror node interface with OpenAPI - async getAccountData(accountId: string): Promise { + async getAccountData(accountId: string): Promise { const url = `${this.mirrorNodeRestUrl}/api/v1/accounts/${accountId}`; return retryOnError(async () => fetchData(url)); } - // TODO: Get mirror node interface with OpenAPI - async getBalanceData(): Promise { - const url = `${this.mirrorNodeRestUrl}/api/v1/balances`; - return retryOnError(async () => fetchData(url)); - } - - // TODO: Get mirror node interface with OpenAPI - async getTokenData(tokenId: string): Promise { + async getTokenData(tokenId: string): Promise { const url = `${this.mirrorNodeRestUrl}/api/v1/tokens/${tokenId}`; return retryOnError(async () => fetchData(url)); } - // TODO: Get mirror node interface with OpenAPI - async getAccountNfts(accountId: string, tokenId: string) { - const url = `${this.mirrorNodeRestUrl}/api/v1/accounts/${accountId}/nfts?token.id=${tokenId}`; + async getAccountNfts(accountId: string): Promise { + const url = `${this.mirrorNodeRestUrl}/api/v1/accounts/${accountId}/nfts`; + return retryOnError(async () => fetchData(url)); } - // TODO: Get mirror node interface with OpenAPI - async getHbarAllowances(accountId: string): Promise { + async getHbarAllowances( + accountId: string, + ): Promise { const url = `${this.mirrorNodeRestUrl}/api/v1/accounts/${accountId}/allowances/crypto`; return retryOnError(async () => fetchData(url)); } - // TODO: Get mirror node interface with OpenAPI - async getTokenAllowances(accountId: string): Promise { + async getTokenAllowances( + accountId: string, + ): Promise { const url = `${this.mirrorNodeRestUrl}/api/v1/accounts/${accountId}/allowances/tokens`; return retryOnError(async () => fetchData(url)); } - // TODO: Get mirror node interface with OpenAPI - async getNftAllowances(accountId: string): Promise { + async getNftAllowances(accountId: string): Promise { const url = `${this.mirrorNodeRestJavaUrl}/api/v1/accounts/${accountId}/allowances/nfts`; return retryOnError(async () => fetchData(url)); } + async getTokenRelationships( accountId: string, tokenId: string, - ): Promise { + ): Promise { const url = `${this.mirrorNodeRestUrl}/api/v1/accounts/${accountId}/tokens?token.id=${tokenId}`; return retryOnError(async () => fetchData(url)); } diff --git a/src/tests/crypto-service/test-account-allowance-approve-transaction.ts b/src/tests/crypto-service/test-account-allowance-approve-transaction.ts index 583fb065..4cfde82a 100644 --- a/src/tests/crypto-service/test-account-allowance-approve-transaction.ts +++ b/src/tests/crypto-service/test-account-allowance-approve-transaction.ts @@ -243,7 +243,7 @@ describe("AccountAllowanceApproveTransaction", function () { await retryOnError(async () => { const mirrorNodeInfo = await mirrorNodeClient.getHbarAllowances(spenderAccountId); - expect(mirrorNodeInfo.allowances.length).to.equal(0); + expect(mirrorNodeInfo.allowances?.length).to.equal(0); }); }); @@ -618,7 +618,7 @@ describe("AccountAllowanceApproveTransaction", function () { await retryOnError(async () => { const mirrorNodeInfo = await mirrorNodeClient.getTokenAllowances(spenderAccountId); - expect(mirrorNodeInfo.allowances.length).to.equal(0); + expect(mirrorNodeInfo.allowances?.length).to.equal(0); }); }); @@ -1730,7 +1730,7 @@ describe("AccountAllowanceApproveTransaction", function () { await retryOnError(async () => { const mirrorNodeInfo = await mirrorNodeClient.getNftAllowances(spenderAccountId); - expect(mirrorNodeInfo.allowances.length).to.equal(0); + expect(mirrorNodeInfo.allowances?.length).to.equal(0); }); }); diff --git a/src/tests/crypto-service/test-account-create-transaction.ts b/src/tests/crypto-service/test-account-create-transaction.ts index 917a269c..aea7e808 100644 --- a/src/tests/crypto-service/test-account-create-transaction.ts +++ b/src/tests/crypto-service/test-account-create-transaction.ts @@ -42,9 +42,7 @@ describe("AccountCreateTransaction", function () { ); expect(accountId).to.equal( - await ( - await mirrorNodeClient.getAccountData(accountId) - ).account, + (await mirrorNodeClient.getAccountData(accountId)).account, ); }; @@ -189,9 +187,9 @@ describe("AccountCreateTransaction", function () { ).balance._valueInTinybar.toString(), ); expect(initialBalance).to.equal( - await ( + ( await mirrorNodeClient.getAccountData(accountId) - ).balance.balance.toString(), + ).balance.balance?.toString(), ); }; @@ -300,9 +298,8 @@ describe("AccountCreateTransaction", function () { .isReceiverSignatureRequired, ); expect(receiverSignatureRequired).to.equal( - await ( - await mirrorNodeClient.getAccountData(accountId) - ).receiver_sig_required, + (await mirrorNodeClient.getAccountData(accountId)) + .receiver_sig_required, ); }; @@ -389,9 +386,9 @@ describe("AccountCreateTransaction", function () { ).autoRenewPeriod.seconds.toString(), ); expect(autoRenewPeriodSeconds).to.equal( - await ( + ( await mirrorNodeClient.getAccountData(accountId) - ).auto_renew_period.toString(), + ).auto_renew_period?.toString(), ); }; @@ -531,9 +528,7 @@ describe("AccountCreateTransaction", function () { (await consensusInfoClient.getAccountInfo(accountId)).accountMemo, ); expect(memo).to.equal( - await ( - await mirrorNodeClient.getAccountData(accountId) - ).memo, + (await mirrorNodeClient.getAccountData(accountId)).memo, ); }; @@ -649,9 +644,8 @@ describe("AccountCreateTransaction", function () { ); expect(maxAutomaticTokenAssociations).to.equal( Number( - await ( - await mirrorNodeClient.getAccountData(accountId) - ).max_automatic_token_associations, + (await mirrorNodeClient.getAccountData(accountId)) + .max_automatic_token_associations, ), ); }; @@ -754,9 +748,7 @@ describe("AccountCreateTransaction", function () { ).stakingInfo?.stakedAccountId?.toString(), ); expect(stakedAccountId).to.equal( - await ( - await mirrorNodeClient.getAccountData(accountId) - ).staked_account_id, + (await mirrorNodeClient.getAccountData(accountId)).staked_account_id, ); }; @@ -771,9 +763,9 @@ describe("AccountCreateTransaction", function () { ).stakingInfo?.stakedNodeId?.toString(), ); expect(stakedNodeId).to.equal( - await ( + ( await mirrorNodeClient.getAccountData(accountId) - ).staked_node_id.toString(), + ).staked_node_id?.toString(), ); }; @@ -935,9 +927,7 @@ describe("AccountCreateTransaction", function () { ?.declineStakingReward, ); expect(declineRewards).to.equal( - await ( - await mirrorNodeClient.getAccountData(accountId) - ).decline_reward, + (await mirrorNodeClient.getAccountData(accountId)).decline_reward, ); }; @@ -997,9 +987,7 @@ describe("AccountCreateTransaction", function () { ); expect("0x" + alias).to.equal( - await ( - await mirrorNodeClient.getAccountData(accountId) - ).evm_address, + (await mirrorNodeClient.getAccountData(accountId)).evm_address, ); }; diff --git a/src/tests/crypto-service/test-account-update-transaction.ts b/src/tests/crypto-service/test-account-update-transaction.ts index 740c94a5..ddc9b73f 100644 --- a/src/tests/crypto-service/test-account-update-transaction.ts +++ b/src/tests/crypto-service/test-account-update-transaction.ts @@ -140,15 +140,12 @@ describe("AccountUpdateTransaction", function () { ); // Mirror node check - const mirrorNodeKey = ( - await ( - await mirrorNodeClient.getAccountData(accountId) - ).key - ).key; + const mirrorNodeKey = (await mirrorNodeClient.getAccountData(accountId)) + .key.key; expect(updatedKey).to.equal( // Removing the unnecessary prefix from the mirror node key - mirrorNodeKey.slice(mirrorNodeKey.length - updatedKey.length), + mirrorNodeKey?.slice(mirrorNodeKey.length - updatedKey.length), ); }; @@ -425,9 +422,9 @@ describe("AccountUpdateTransaction", function () { ).autoRenewPeriod.seconds.toString(), ); expect(autoRenewPeriodSeconds).to.equal( - await ( + ( await mirrorNodeClient.getAccountData(accountId) - ).auto_renew_period.toString(), + ).auto_renew_period?.toString(), ); }; @@ -556,9 +553,7 @@ describe("AccountUpdateTransaction", function () { ); expect(expirationTime).to.equal( Number( - await ( - await mirrorNodeClient.getAccountData(accountId) - ).expiry_timestamp, + (await mirrorNodeClient.getAccountData(accountId)).expiry_timestamp, ).toString(), ); }; @@ -605,7 +600,7 @@ describe("AccountUpdateTransaction", function () { it("(#3) Updates the expiration time of an account to 1 second less than its current expiration time", async function () { // Get the account's expiration time. const accountInfo = await mirrorNodeClient.getAccountData(accountId); - const expirationTimeSeconds = await accountInfo.expiry_timestamp; + const expirationTimeSeconds = accountInfo.expiry_timestamp; const expirationTime = Math.floor( Number(expirationTimeSeconds) - 1, ).toString(); @@ -662,9 +657,8 @@ describe("AccountUpdateTransaction", function () { .isReceiverSignatureRequired, ); expect(receiverSignatureRequired).to.equal( - await ( - await mirrorNodeClient.getAccountData(accountId) - ).receiver_sig_required, + (await mirrorNodeClient.getAccountData(accountId)) + .receiver_sig_required, ); }; @@ -712,9 +706,7 @@ describe("AccountUpdateTransaction", function () { (await consensusInfoClient.getAccountInfo(accountId)).accountMemo, ); expect(memo).to.equal( - await ( - await mirrorNodeClient.getAccountData(accountId) - ).memo, + (await mirrorNodeClient.getAccountData(accountId)).memo, ); }; @@ -800,9 +792,8 @@ describe("AccountUpdateTransaction", function () { ); expect(maxAutomaticTokenAssociations).to.equal( Number( - await ( - await mirrorNodeClient.getAccountData(accountId) - ).max_automatic_token_associations, + (await mirrorNodeClient.getAccountData(accountId)) + .max_automatic_token_associations, ), ); }; @@ -898,9 +889,7 @@ describe("AccountUpdateTransaction", function () { ).stakingInfo?.stakedAccountId?.toString(), ); expect(stakedAccountId).to.equal( - await ( - await mirrorNodeClient.getAccountData(accountId) - ).staked_account_id, + (await mirrorNodeClient.getAccountData(accountId)).staked_account_id, ); }; @@ -913,9 +902,9 @@ describe("AccountUpdateTransaction", function () { ); expect(stakedAccountId).to.equal( - (await ( + ( await mirrorNodeClient.getAccountData(accountId) - ).staked_account_id?.toString()) || "0", + ).staked_account_id?.toString() || "0", ); }; diff --git a/src/tests/token-service/test-token-associate-transaction.ts b/src/tests/token-service/test-token-associate-transaction.ts index 82ef922d..42fae7ca 100644 --- a/src/tests/token-service/test-token-associate-transaction.ts +++ b/src/tests/token-service/test-token-associate-transaction.ts @@ -56,8 +56,8 @@ describe("TokenAssociateTransaction", function () { ); let foundToken = false; - for (let i = 0; i < mirrorNodeInfo.tokens.length; i++) { - if (mirrorNodeInfo.tokens[i].token_id === tokenId) { + for (let i = 0; i < mirrorNodeInfo?.tokens?.length!; i++) { + if (mirrorNodeInfo?.tokens?.[i]?.token_id === tokenId) { foundToken = true; break; } @@ -192,7 +192,7 @@ describe("TokenAssociateTransaction", function () { accountId, tokenId, ); - expect(mirrorNodeInfo.tokens.length).to.equal(0); + expect(mirrorNodeInfo.tokens?.length).to.equal(0); }); }); diff --git a/src/tests/token-service/test-token-create-transaction.ts b/src/tests/token-service/test-token-create-transaction.ts index 36ce1640..cb26d4c0 100644 --- a/src/tests/token-service/test-token-create-transaction.ts +++ b/src/tests/token-service/test-token-create-transaction.ts @@ -52,9 +52,7 @@ describe("TokenCreateTransaction", function () { (await consensusInfoClient.getTokenInfo(tokenId)).name, ); expect(name).to.equal( - await ( - await mirrorNodeClient.getTokenData(tokenId) - ).name, + (await mirrorNodeClient.getTokenData(tokenId)).name, ); }; @@ -146,9 +144,7 @@ describe("TokenCreateTransaction", function () { (await consensusInfoClient.getTokenInfo(tokenId)).symbol, ); expect(symbol).to.equal( - await ( - await mirrorNodeClient.getTokenData(tokenId) - ).symbol, + (await mirrorNodeClient.getTokenData(tokenId)).symbol, ); }; @@ -231,7 +227,7 @@ describe("TokenCreateTransaction", function () { ); expect(decimals).to.equal( - Number(await (await mirrorNodeClient.getTokenData(tokenId)).decimals), + Number((await mirrorNodeClient.getTokenData(tokenId)).decimals), ); }; @@ -414,9 +410,8 @@ describe("TokenCreateTransaction", function () { await consensusInfoClient.getTokenInfo(tokenId) ).totalSupply; - const totalSupplyMirror = await ( - await mirrorNodeClient.getTokenData(tokenId) - ).initial_supply; + const totalSupplyMirror = (await mirrorNodeClient.getTokenData(tokenId)) + .initial_supply; expect(initialSupply).to.equal(totalSupplyConsensus.toString()); expect(initialSupply).to.equal(totalSupplyMirror); @@ -619,9 +614,7 @@ describe("TokenCreateTransaction", function () { ).treasuryAccountId?.toString(), ); expect(treasuryAccountId).to.equal( - await ( - await mirrorNodeClient.getTokenData(tokenId) - ).treasury_account_id, + (await mirrorNodeClient.getTokenData(tokenId)).treasury_account_id, ); }; @@ -1639,15 +1632,11 @@ describe("TokenCreateTransaction", function () { freezeDefault: boolean, ) => { expect(freezeDefault).to.equal( - await ( - await consensusInfoClient.getTokenInfo(tokenId) - ).defaultFreezeStatus, + (await consensusInfoClient.getTokenInfo(tokenId)).defaultFreezeStatus, ); expect(freezeDefault).to.equal( - await ( - await mirrorNodeClient.getTokenData(tokenId) - ).freeze_default, + (await mirrorNodeClient.getTokenData(tokenId)).freeze_default, ); }; @@ -1925,9 +1914,7 @@ describe("TokenCreateTransaction", function () { ).autoRenewAccountId?.toString(), ); expect(accountId).to.equal( - await ( - await mirrorNodeClient.getTokenData(tokenId) - ).auto_renew_account, + (await mirrorNodeClient.getTokenData(tokenId)).auto_renew_account, ); }); @@ -2045,9 +2032,9 @@ describe("TokenCreateTransaction", function () { ); expect(autoRenewPeriod).to.equal( - await ( + ( await mirrorNodeClient.getTokenData(tokenId) - ).auto_renew_period.toString(), + ).auto_renew_period?.toString(), ); }; @@ -2241,9 +2228,7 @@ describe("TokenCreateTransaction", function () { (await consensusInfoClient.getTokenInfo(tokenId)).tokenMemo, ); expect(memo).to.equal( - await ( - await mirrorNodeClient.getTokenData(tokenId) - ).memo, + (await mirrorNodeClient.getTokenData(tokenId)).memo, ); }; @@ -2311,9 +2296,7 @@ describe("TokenCreateTransaction", function () { ); expect(type).to.equal( - await ( - await mirrorNodeClient.getTokenData(tokenId) - ).type, + (await mirrorNodeClient.getTokenData(tokenId)).type, ); }; @@ -2364,9 +2347,7 @@ describe("TokenCreateTransaction", function () { ).supplyType?.toString(), ); expect(type).to.equal( - await ( - await mirrorNodeClient.getTokenData(tokenId) - ).supply_type, + (await mirrorNodeClient.getTokenData(tokenId)).supply_type, ); }; @@ -2403,7 +2384,7 @@ describe("TokenCreateTransaction", function () { await consensusInfoClient.getTokenInfo(tokenId) ).maxSupply; - const totalMaxSupplyMirror = await ( + const totalMaxSupplyMirror = ( await mirrorNodeClient.getTokenData(tokenId) ).max_supply; @@ -5109,11 +5090,10 @@ describe("TokenCreateTransaction", function () { expect(metadataConsensus?.toString()).to.equal(expectedMetadata); - const metadataMirror = await ( - await mirrorNodeClient.getTokenData(tokenId) - ).metadata; + const metadataMirror = (await mirrorNodeClient.getTokenData(tokenId)) + .metadata; - expect(Buffer.from(metadataMirror, "base64").toString("utf8")).to.equal( + expect(Buffer.from(metadataMirror!, "base64").toString("utf8")).to.equal( expectedMetadata, ); }; diff --git a/src/tests/token-service/test-token-dissociate-transaction.ts b/src/tests/token-service/test-token-dissociate-transaction.ts index 40b46e04..59a588db 100644 --- a/src/tests/token-service/test-token-dissociate-transaction.ts +++ b/src/tests/token-service/test-token-dissociate-transaction.ts @@ -75,8 +75,8 @@ describe("TokenDissociateTransaction", function () { ); let foundToken = false; - for (let i = 0; i < mirrorNodeInfo.tokens.length; i++) { - if (mirrorNodeInfo.tokens[i].token_id === tokenId) { + for (let i = 0; i < mirrorNodeInfo?.tokens?.length!; i++) { + if (mirrorNodeInfo?.tokens?.[i]?.token_id === tokenId) { foundToken = true; break; } @@ -91,7 +91,7 @@ describe("TokenDissociateTransaction", function () { accountId, tokenId, ); - expect(mirrorNodeInfo.tokens.length).to.equal(0); + expect(mirrorNodeInfo?.tokens?.length).to.equal(0); } describe("Account ID", function () { diff --git a/src/tests/token-service/test-token-freeze-transaction.ts b/src/tests/token-service/test-token-freeze-transaction.ts index c66a414e..731ec00d 100644 --- a/src/tests/token-service/test-token-freeze-transaction.ts +++ b/src/tests/token-service/test-token-freeze-transaction.ts @@ -92,9 +92,9 @@ describe("TokenFreezeTransaction", function () { ); let foundToken = false; - for (let i = 0; i < mirrorNodeInfo.tokens.length; i++) { - if (mirrorNodeInfo.tokens[i].token_id === tokenId) { - expect(mirrorNodeInfo.tokens[i].freeze_status).to.equal("FROZEN"); + for (let i = 0; i < mirrorNodeInfo?.tokens?.length!; i++) { + if (mirrorNodeInfo?.tokens?.[i]?.token_id === tokenId) { + expect(mirrorNodeInfo?.tokens?.[i]?.freeze_status).to.equal("FROZEN"); foundToken = true; break; } diff --git a/src/tests/token-service/test-token-grant-kyc-transaction.ts b/src/tests/token-service/test-token-grant-kyc-transaction.ts index 5cef8b37..cef3f217 100644 --- a/src/tests/token-service/test-token-grant-kyc-transaction.ts +++ b/src/tests/token-service/test-token-grant-kyc-transaction.ts @@ -100,9 +100,9 @@ describe("TokenGrantKycTransaction", function () { ); let foundToken = false; - for (let i = 0; i < mirrorNodeInfo.tokens.length; i++) { - if (mirrorNodeInfo.tokens[i].token_id === tokenId) { - expect(mirrorNodeInfo.tokens[i].kyc_status).to.equal("GRANTED"); + for (let i = 0; i < mirrorNodeInfo?.tokens?.length!; i++) { + if (mirrorNodeInfo?.tokens?.[i]?.token_id === tokenId) { + expect(mirrorNodeInfo?.tokens?.[i]?.kyc_status).to.equal("GRANTED"); foundToken = true; break; } diff --git a/src/tests/token-service/test-token-revoke-kyc-transaction.ts b/src/tests/token-service/test-token-revoke-kyc-transaction.ts index 0e601011..b3b23f9f 100644 --- a/src/tests/token-service/test-token-revoke-kyc-transaction.ts +++ b/src/tests/token-service/test-token-revoke-kyc-transaction.ts @@ -5,6 +5,7 @@ import mirrorNodeClient from "@services/MirrorNodeClient"; import { setOperator } from "@helpers/setup-tests"; import { retryOnError } from "@helpers/retry-on-error"; + import { ErrorStatusCodes } from "@enums/error-status-codes"; /** @@ -108,9 +109,9 @@ describe("TokenRevokeKycTransaction", function () { ); let foundToken = false; - for (let i = 0; i < mirrorNodeInfo.tokens.length; i++) { - if (mirrorNodeInfo.tokens[i].token_id === tokenId) { - expect(mirrorNodeInfo.tokens[i].kyc_status).to.equal("REVOKED"); + for (let i = 0; i < mirrorNodeInfo?.tokens?.length!; i++) { + if (mirrorNodeInfo?.tokens?.[i]?.token_id === tokenId) { + expect(mirrorNodeInfo?.tokens?.[i]?.kyc_status).to.equal("REVOKED"); foundToken = true; break; } diff --git a/src/tests/token-service/test-token-unfreeze-transaction.ts b/src/tests/token-service/test-token-unfreeze-transaction.ts index 833b2026..8b3ad0c9 100644 --- a/src/tests/token-service/test-token-unfreeze-transaction.ts +++ b/src/tests/token-service/test-token-unfreeze-transaction.ts @@ -100,9 +100,9 @@ describe("TokenUnfreezeTransaction", function () { ); let foundToken = false; - for (let i = 0; i < mirrorNodeInfo.tokens.length; i++) { - if (mirrorNodeInfo.tokens[i].token_id === tokenId) { - expect(mirrorNodeInfo.tokens[i].freeze_status).to.equal("UNFROZEN"); + for (let i = 0; i < mirrorNodeInfo?.tokens?.length!; i++) { + if (mirrorNodeInfo?.tokens?.[i]?.token_id === tokenId) { + expect(mirrorNodeInfo?.tokens?.[i]?.freeze_status).to.equal("UNFROZEN"); foundToken = true; break; } diff --git a/src/tests/token-service/test-token-update-transaction.ts b/src/tests/token-service/test-token-update-transaction.ts index 17d66e3d..7b89d5ad 100644 --- a/src/tests/token-service/test-token-update-transaction.ts +++ b/src/tests/token-service/test-token-update-transaction.ts @@ -139,9 +139,7 @@ describe("TokenUpdateTransaction", function () { (await consensusInfoClient.getTokenInfo(tokenId)).symbol, ); expect(symbol).to.equal( - await ( - await mirrorNodeClient.getTokenData(tokenId) - ).symbol, + (await mirrorNodeClient.getTokenData(tokenId)).symbol, ); }; @@ -245,9 +243,7 @@ describe("TokenUpdateTransaction", function () { ); expect(name).to.equal( - await ( - await mirrorNodeClient.getTokenData(tokenId) - ).name, + (await mirrorNodeClient.getTokenData(tokenId)).name, ); }; @@ -2063,9 +2059,7 @@ describe("TokenUpdateTransaction", function () { ); expect(autoRenewPeriod).to.equal( - await ( - await mirrorNodeClient.getTokenData(tokenId) - ).auto_renew_period, + (await mirrorNodeClient.getTokenData(tokenId)).auto_renew_period, ); }; @@ -2482,9 +2476,7 @@ describe("TokenUpdateTransaction", function () { ); expect(memo).to.equal( - await ( - await mirrorNodeClient.getTokenData(tokenId) - ).memo, + (await mirrorNodeClient.getTokenData(tokenId)).memo, ); }; diff --git a/src/utils/helpers/allowances.ts b/src/utils/helpers/allowances.ts index 7ab1041f..e0bb5952 100644 --- a/src/utils/helpers/allowances.ts +++ b/src/utils/helpers/allowances.ts @@ -2,6 +2,8 @@ import { expect } from "chai"; import mirrorNodeClient from "@services/MirrorNodeClient"; +import { Allowance, Nft, NftAllowance } from "@models/mirror-node-models"; + export const verifyHbarAllowance = async ( ownerAccountId: string, spenderAccountId: string, @@ -10,12 +12,11 @@ export const verifyHbarAllowance = async ( const mirrorNodeInfo = await mirrorNodeClient.getHbarAllowances(ownerAccountId); - const foundAllowance = mirrorNodeInfo.allowances.some( - // TODO: Get mirror node interface with OpenAPI - (allowance: any) => + const foundAllowance = mirrorNodeInfo.allowances?.some( + (allowance: Allowance) => allowance.owner === ownerAccountId && allowance.spender === spenderAccountId && - allowance.amount.toString() === amount, + allowance.amount?.toString() === amount, ); expect(foundAllowance).to.be.true; @@ -29,14 +30,12 @@ export const verifyTokenAllowance = async ( ) => { const mirrorNodeInfo = await mirrorNodeClient.getTokenAllowances(ownerAccountId); - - const foundAllowance = mirrorNodeInfo.allowances.some( - // TODO: Get mirror node interface with OpenAPI - (allowance: any) => + const foundAllowance = mirrorNodeInfo.allowances?.some( + (allowance: Allowance) => allowance.owner === ownerAccountId && allowance.spender === spenderAccountId && - allowance.token_id === tokenId && - allowance.amount.toString() === amount, + (allowance as Nft).token_id === tokenId && + allowance.amount?.toString() === amount, ); expect(foundAllowance).to.be.true; @@ -50,13 +49,9 @@ export const verifyNftAllowance = async ( serialNumber: string, delegatingSpenderAccountId: string | null = null, ) => { - const mirrorNodeInfo = await mirrorNodeClient.getAccountNfts( - ownerAccountId, - tokenId, - ); + const mirrorNodeInfo = await mirrorNodeClient.getAccountNfts(ownerAccountId); - const foundAllowance = mirrorNodeInfo.nfts.some( - // TODO: Get mirror node interface with OpenAPI + const foundAllowance = mirrorNodeInfo.nfts?.some( (allowance: any) => allowance.account_id === ownerAccountId && allowance.spender === spenderAccountId && @@ -78,9 +73,8 @@ export const verifyApprovedForAllAllowance = async ( const mirrorNodeInfo = await mirrorNodeClient.getNftAllowances(ownerAccountId); - const foundAllowance = mirrorNodeInfo.allowances.some( - // TODO: Get mirror node interface with OpenAPI - (allowance: any) => + const foundAllowance = mirrorNodeInfo.allowances?.some( + (allowance: NftAllowance) => allowance.token_id === tokenId && allowance.owner === ownerAccountId && allowance.spender === spenderAccountId, @@ -95,18 +89,14 @@ export const verifyNoNftAllowance = async ( tokenId: string, serialNumber: string, ) => { - const mirrorNodeInfo = await mirrorNodeClient.getAccountNfts( - ownerAccountId, - tokenId, - ); + const mirrorNodeInfo = await mirrorNodeClient.getAccountNfts(ownerAccountId); - const foundAllowance = mirrorNodeInfo.nfts.some( - // TODO: Get mirror node interface with OpenAPI - (nft: any) => + const foundAllowance = mirrorNodeInfo.nfts?.some( + (nft: Nft) => nft.account_id === ownerAccountId && nft.spender === spenderAccountId && nft.token_id === tokenId && - nft.serial_number.toString() === serialNumber, + nft.serial_number?.toString() === serialNumber, ); expect(foundAllowance).to.be.false; diff --git a/src/utils/helpers/custom-fees.ts b/src/utils/helpers/custom-fees.ts index e36f3df9..df8d36de 100644 --- a/src/utils/helpers/custom-fees.ts +++ b/src/utils/helpers/custom-fees.ts @@ -174,10 +174,10 @@ export const verifyTokenCreationWithFixedFee = async ( } } - for (let i = 0; i < mirrorNodeInfo.custom_fees.fixed_fees.length; i++) { + for (let i = 0; i < mirrorNodeInfo?.custom_fees?.fixed_fees?.length!; i++) { if ( mirrorNodeFeeEqualsCustomFixedFee( - mirrorNodeInfo.custom_fees.fixed_fees[i], + mirrorNodeInfo?.custom_fees?.fixed_fees![i], feeCollectorAccountId, amount, ) @@ -226,10 +226,14 @@ export const verifyTokenCreationWithFractionalFee = async ( } } - for (let i = 0; i < mirrorNodeInfo.custom_fees.fractional_fees.length; i++) { + for ( + let i = 0; + i < mirrorNodeInfo?.custom_fees?.fractional_fees?.length!; + i++ + ) { if ( mirrorNodeFeeEqualsCustomFractionalFee( - mirrorNodeInfo.custom_fees.fractional_fees[i], + mirrorNodeInfo?.custom_fees?.fractional_fees![i], feeCollectorAccountId, numerator, denominator, @@ -278,10 +282,10 @@ export const verifyTokenCreationWithRoyaltyFee = async ( } } - for (let i = 0; i < mirrorNodeInfo.custom_fees.royalty_fees.length; i++) { + for (let i = 0; i < mirrorNodeInfo?.custom_fees?.royalty_fees?.length!; i++) { if ( mirrorNodeFeeEqualsCustomRoyaltyFee( - mirrorNodeInfo.custom_fees.royalty_fees[i], + mirrorNodeInfo?.custom_fees?.royalty_fees![i], feeCollectorAccountId, numerator, denominator, diff --git a/src/utils/helpers/token.ts b/src/utils/helpers/token.ts index 0766cc52..b048e531 100644 --- a/src/utils/helpers/token.ts +++ b/src/utils/helpers/token.ts @@ -15,11 +15,10 @@ import { retryOnError } from "@helpers/retry-on-error"; * @throws {Error} Will throw an error if the token is not marked as deleted in either Consensus Info or Mirror Node. */ export const verifyTokenIsDeleted = async (tokenId: string) => { - expect(await (await consensusInfoClient.getTokenInfo(tokenId)).isDeleted).to - .be.true; - - expect(await (await mirrorNodeClient.getTokenData(tokenId)).deleted).to.be + expect((await consensusInfoClient.getTokenInfo(tokenId)).isDeleted).to.be .true; + + expect((await mirrorNodeClient.getTokenData(tokenId)).deleted).to.be.true; }; /** @@ -161,11 +160,11 @@ export async function verifyFungibleTokenMint( let foundToken = false; for ( let tokenIndex = 0; - tokenIndex < mirrorNodeInfo.tokens.length; + tokenIndex < mirrorNodeInfo?.tokens?.length!; tokenIndex++ ) { - const token = mirrorNodeInfo.tokens[tokenIndex]; - if (token.token_id === tokenId) { + const token = mirrorNodeInfo?.tokens?.[tokenIndex]; + if (token?.token_id === tokenId) { // Make sure the balance from the mirror node matches the input amount. expect(String(token.balance)).to.equal(amount); @@ -224,22 +223,24 @@ export async function verifyNonFungibleTokenMint( // Query the mirror node. await retryOnError(async () => { - const mirrorNodeInfo = await mirrorNodeClient.getAccountNfts( - treasuryAccountId, - tokenId, - ); + const mirrorNodeInfo = + await mirrorNodeClient.getAccountNfts(treasuryAccountId); foundNft = false; - for (let nftIndex = 0; nftIndex < mirrorNodeInfo.nfts.length; nftIndex++) { - const nft = mirrorNodeInfo.nfts[nftIndex]; + for ( + let nftIndex = 0; + nftIndex < mirrorNodeInfo.nfts?.length!; + nftIndex++ + ) { + const nft = mirrorNodeInfo.nfts?.[nftIndex]; if ( - nft.token_id === tokenId && - nft.serial_number.toString() === serialNumber + nft?.token_id === tokenId && + nft?.serial_number?.toString() === serialNumber ) { expect(nft.account_id).to.equal(treasuryAccountId); - const nftMetadataHex = Buffer.from(nft.metadata, "base64").toString( + const nftMetadataHex = Buffer.from(nft.metadata!, "base64").toString( "hex", ); expect(nftMetadataHex).to.equal(metadata); @@ -281,9 +282,10 @@ export async function verifyFungibleTokenBurn( ); let foundToken = false; - for (let i = 0; i < mirrorNodeInfo.tokens.length; i++) { - if (mirrorNodeInfo.tokens[i].token_id === tokenId) { - expect(mirrorNodeInfo.tokens[i].balance.toString()).to.equal( + + for (let i = 0; i < mirrorNodeInfo?.tokens?.length!; i++) { + if (mirrorNodeInfo?.tokens?.[i]?.token_id === tokenId) { + expect(mirrorNodeInfo?.tokens?.[i]?.balance.toString()).to.equal( (BigInt(initialSupply) - BigInt(amount)).toString(), ); foundToken = true; @@ -313,11 +315,8 @@ export async function verifyNonFungibleTokenBurn( // Query the consensus node. Should throw since the NFT shouldn't exist anymore. let foundNft = true; try { - const consensusNodeInfo = await consensusInfoClient.getTokenNftInfo( - tokenId, - serialNumber, - ); - } catch (err: any) { + await consensusInfoClient.getTokenNftInfo(tokenId, serialNumber); + } catch { foundNft = false; } @@ -326,15 +325,14 @@ export async function verifyNonFungibleTokenBurn( // Query the mirror node. await retryOnError(async () => { - const mirrorNodeInfo = await mirrorNodeClient.getAccountNfts( - treasuryAccountId, - tokenId, - ); + const mirrorNodeInfo = + await mirrorNodeClient.getAccountNfts(treasuryAccountId); + foundNft = false; - for (let i = 0; i < mirrorNodeInfo.nfts.length; i++) { + for (let i = 0; i < mirrorNodeInfo.nfts?.length!; i++) { if ( - mirrorNodeInfo.nfts[i].token_id === tokenId && - mirrorNodeInfo.nfts[i].serial_number.toString() === serialNumber + mirrorNodeInfo.nfts?.[i]?.token_id === tokenId && + mirrorNodeInfo.nfts?.[i]?.serial_number?.toString() === serialNumber ) { foundNft = true; break; diff --git a/src/utils/helpers/verify-token-tx.ts b/src/utils/helpers/verify-token-tx.ts index 560c99c4..bf2e40b1 100644 --- a/src/utils/helpers/verify-token-tx.ts +++ b/src/utils/helpers/verify-token-tx.ts @@ -10,6 +10,8 @@ import { import mirrorNodeClient from "@services/MirrorNodeClient"; import consensusInfoClient from "@services/ConsensusInfoClient"; +import { TokenInfo as TokenInfoMirrorNode } from "@models/mirror-node-models"; + export const verifyTokenKey = async ( tokenId: string, key: string, @@ -27,7 +29,9 @@ export const verifyTokenKey = async ( const mirrorNodeKey = transformConsensusToMirrorNodeProp(keyType); // Fetch the key from the mirror node const publicKeyMirrorNode = await getPublicKeyFromMirrorNode( - (await mirrorNodeClient.getTokenData(tokenId))[mirrorNodeKey], + (await mirrorNodeClient.getTokenData(tokenId))[ + mirrorNodeKey as keyof TokenInfoMirrorNode + ], ); // Verify that the key from the mirror node matches the raw key @@ -52,19 +56,23 @@ export const verifyTokenKeyList = async ( const mirrorNodeKeyName = transformConsensusToMirrorNodeProp(keyType); // Mirror node check - const mirrorNodeKey = await ( - await mirrorNodeClient.getTokenData(tokenId) - )[mirrorNodeKeyName].key; + const tokenData = await mirrorNodeClient.getTokenData(tokenId); + const keyData = tokenData[mirrorNodeKeyName as keyof TokenInfoMirrorNode] as { + key: string; + }; + const mirrorNodeKey = keyData?.key; // Verify that the key from the mirror node matches the expected key expect(key).to.equal( // Removing the unnecessary prefix from the mirror node key - mirrorNodeKey.slice(mirrorNodeKey.length - key.length), + mirrorNodeKey.slice(mirrorNodeKey?.length - key.length), ); }; -const transformConsensusToMirrorNodeProp = (key: string) => { - return key.replace(/([a-z])([A-Z])/g, "$1_$2").toLowerCase(); +const transformConsensusToMirrorNodeProp = (key: string): keyof TokenInfo => { + return key + .replace(/([a-z])([A-Z])/g, "$1_$2") + .toLowerCase() as keyof TokenInfo; }; export const verifyTokenUpdateWithNullKey = async ( @@ -82,7 +90,9 @@ export const verifyTokenUpdateWithNullKey = async ( // Fetch the key from the mirror node and check if it is null const mirrorNodeKey = await getPublicKeyFromMirrorNode( - (await mirrorNodeClient.getTokenData(tokenId))[mirrorNodeKeyName], + (await mirrorNodeClient.getTokenData(tokenId))[ + mirrorNodeKeyName as keyof TokenInfoMirrorNode + ], ); expect(null).to.equal(mirrorNodeKey); }; @@ -99,13 +109,13 @@ export const verifyTokenExpirationTimeUpdate = async ( (await consensusInfoClient.getTokenInfo(tokenId)).expirationTime, ); - const mirrorNodeExpirationDateNanoseconds = await ( + const mirrorNodeExpirationDateNanoseconds = ( await mirrorNodeClient.getTokenData(tokenId) ).expiry_timestamp; // Convert nanoseconds got back from to timestamp const mirrorNodeTimestamp = Timestamp.fromDate( - new Date(mirrorNodeExpirationDateNanoseconds / 1000000), + new Date(mirrorNodeExpirationDateNanoseconds! / 1000000), ); expect(parsedExpirationTime).to.deep.equal(mirrorNodeTimestamp); diff --git a/src/utils/models/mirror-node-models/AccountAlias.ts b/src/utils/models/mirror-node-models/AccountAlias.ts new file mode 100644 index 00000000..3fc9bf45 --- /dev/null +++ b/src/utils/models/mirror-node-models/AccountAlias.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Account alias in the format of 'shard.realm.alias', 'realm.alias', or 'alias'. 'alias' is the RFC4648 no-padding base32 encoded string of the account's alias. + */ +export type AccountAlias = string; diff --git a/src/utils/models/mirror-node-models/AccountBalance.ts b/src/utils/models/mirror-node-models/AccountBalance.ts new file mode 100644 index 00000000..2747073b --- /dev/null +++ b/src/utils/models/mirror-node-models/AccountBalance.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { TokenBalance } from './TokenBalance'; +export type AccountBalance = { + account: EntityId; + balance: number; + tokens: Array; +}; + diff --git a/src/utils/models/mirror-node-models/AccountBalanceTransactions.ts b/src/utils/models/mirror-node-models/AccountBalanceTransactions.ts new file mode 100644 index 00000000..1a331f65 --- /dev/null +++ b/src/utils/models/mirror-node-models/AccountBalanceTransactions.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { AccountInfo } from './AccountInfo'; +import type { Links } from './Links'; +import type { Transactions } from './Transactions'; +export type AccountBalanceTransactions = (AccountInfo & { + transactions: Transactions; + links: Links; +}); + diff --git a/src/utils/models/mirror-node-models/AccountInfo.ts b/src/utils/models/mirror-node-models/AccountInfo.ts new file mode 100644 index 00000000..c60a8d95 --- /dev/null +++ b/src/utils/models/mirror-node-models/AccountInfo.ts @@ -0,0 +1,42 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Alias } from './Alias'; +import type { Balance } from './Balance'; +import type { EntityId } from './EntityId'; +import type { EvmAddressNullable } from './EvmAddressNullable'; +import type { Key } from './Key'; +import type { TimestampNullable } from './TimestampNullable'; +export type AccountInfo = { + account: EntityId; + alias: Alias; + auto_renew_period: number | null; + balance: Balance; + created_timestamp: TimestampNullable; + /** + * Whether the account declines receiving a staking reward + */ + decline_reward: boolean; + deleted: boolean | null; + ethereum_nonce: number | null; + evm_address: EvmAddressNullable; + expiry_timestamp: TimestampNullable; + key: Key; + max_automatic_token_associations: number | null; + memo: string | null; + /** + * The pending reward in tinybars the account will receive in the next reward payout. Note the value is updated + * at the end of each staking period and there may be delay to reflect the changes in the past staking period. + * + */ + pending_reward?: number; + receiver_sig_required: boolean | null; + staked_account_id: EntityId; + /** + * The id of the node to which this account is staking + */ + staked_node_id: number | null; + stake_period_start: TimestampNullable; +}; + diff --git a/src/utils/models/mirror-node-models/Accounts.ts b/src/utils/models/mirror-node-models/Accounts.ts new file mode 100644 index 00000000..c325e5b6 --- /dev/null +++ b/src/utils/models/mirror-node-models/Accounts.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { AccountInfo } from './AccountInfo'; +export type Accounts = Array; diff --git a/src/utils/models/mirror-node-models/AccountsResponse.ts b/src/utils/models/mirror-node-models/AccountsResponse.ts new file mode 100644 index 00000000..7a785859 --- /dev/null +++ b/src/utils/models/mirror-node-models/AccountsResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Accounts } from './Accounts'; +import type { Links } from './Links'; +export type AccountsResponse = { + accounts: Accounts; + links: Links; +}; + diff --git a/src/utils/models/mirror-node-models/Alias.ts b/src/utils/models/mirror-node-models/Alias.ts new file mode 100644 index 00000000..c3f61c5a --- /dev/null +++ b/src/utils/models/mirror-node-models/Alias.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * RFC4648 no-padding base32 encoded account alias + */ +export type Alias = string | null; diff --git a/src/utils/models/mirror-node-models/Allowance.ts b/src/utils/models/mirror-node-models/Allowance.ts new file mode 100644 index 00000000..8eedfd54 --- /dev/null +++ b/src/utils/models/mirror-node-models/Allowance.ts @@ -0,0 +1,20 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { TimestampRange } from './TimestampRange'; +export type Allowance = { + /** + * The amount remaining of the original amount granted. + */ + amount?: number; + /** + * The granted amount of the spender's allowance. + */ + amount_granted?: number; + owner?: EntityId; + spender?: EntityId; + timestamp?: TimestampRange; +}; + diff --git a/src/utils/models/mirror-node-models/AssessedCustomFee.ts b/src/utils/models/mirror-node-models/AssessedCustomFee.ts new file mode 100644 index 00000000..efc79154 --- /dev/null +++ b/src/utils/models/mirror-node-models/AssessedCustomFee.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +export type AssessedCustomFee = { + amount?: number; + collector_account_id?: EntityId; + effective_payer_account_ids?: Array; + token_id?: EntityId; +}; + diff --git a/src/utils/models/mirror-node-models/Balance.ts b/src/utils/models/mirror-node-models/Balance.ts new file mode 100644 index 00000000..2b8cdbab --- /dev/null +++ b/src/utils/models/mirror-node-models/Balance.ts @@ -0,0 +1,15 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { TimestampNullable } from './TimestampNullable'; +export type Balance = { + timestamp: TimestampNullable; + balance: number | null; + tokens: Array<{ + token_id?: EntityId; + balance?: number; + }>; +}; + diff --git a/src/utils/models/mirror-node-models/BalancesResponse.ts b/src/utils/models/mirror-node-models/BalancesResponse.ts new file mode 100644 index 00000000..305339f8 --- /dev/null +++ b/src/utils/models/mirror-node-models/BalancesResponse.ts @@ -0,0 +1,13 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { AccountBalance } from './AccountBalance'; +import type { Links } from './Links'; +import type { TimestampNullable } from './TimestampNullable'; +export type BalancesResponse = { + timestamp?: TimestampNullable; + balances?: Array; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/Block.ts b/src/utils/models/mirror-node-models/Block.ts new file mode 100644 index 00000000..48206f5f --- /dev/null +++ b/src/utils/models/mirror-node-models/Block.ts @@ -0,0 +1,21 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { TimestampRange } from './TimestampRange'; +export type Block = { + count?: number; + gas_used?: number | null; + hapi_version?: string | null; + hash?: string; + /** + * A hex encoded 256-byte array with 0x prefix + */ + logs_bloom?: string | null; + name?: string; + number?: number; + previous_hash?: string; + size?: number | null; + timestamp?: TimestampRange; +}; + diff --git a/src/utils/models/mirror-node-models/Blocks.ts b/src/utils/models/mirror-node-models/Blocks.ts new file mode 100644 index 00000000..8d0232dc --- /dev/null +++ b/src/utils/models/mirror-node-models/Blocks.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Block } from './Block'; +export type Blocks = Array; diff --git a/src/utils/models/mirror-node-models/BlocksResponse.ts b/src/utils/models/mirror-node-models/BlocksResponse.ts new file mode 100644 index 00000000..1dde7103 --- /dev/null +++ b/src/utils/models/mirror-node-models/BlocksResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Blocks } from './Blocks'; +import type { Links } from './Links'; +export type BlocksResponse = { + blocks?: Blocks; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/Bloom.ts b/src/utils/models/mirror-node-models/Bloom.ts new file mode 100644 index 00000000..cec8e73d --- /dev/null +++ b/src/utils/models/mirror-node-models/Bloom.ts @@ -0,0 +1,5 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type Bloom = Blob | null; diff --git a/src/utils/models/mirror-node-models/ChunkInfo.ts b/src/utils/models/mirror-node-models/ChunkInfo.ts new file mode 100644 index 00000000..5dd0e7a4 --- /dev/null +++ b/src/utils/models/mirror-node-models/ChunkInfo.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { TransactionId } from './TransactionId'; +export type ChunkInfo = { + initial_transaction_id?: TransactionId; + number?: number; + total?: number; +}; + diff --git a/src/utils/models/mirror-node-models/Contract.ts b/src/utils/models/mirror-node-models/Contract.ts new file mode 100644 index 00000000..e0aa8b6d --- /dev/null +++ b/src/utils/models/mirror-node-models/Contract.ts @@ -0,0 +1,27 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { EvmAddress } from './EvmAddress'; +import type { Key } from './Key'; +import type { TimestampNullable } from './TimestampNullable'; +import type { TimestampRange } from './TimestampRange'; +export type Contract = { + admin_key?: Key; + auto_renew_account?: EntityId; + auto_renew_period?: number | null; + contract_id?: EntityId; + created_timestamp?: TimestampNullable; + deleted?: boolean; + evm_address?: EvmAddress; + expiration_timestamp?: TimestampNullable; + file_id?: EntityId; + max_automatic_token_associations?: number | null; + memo?: string; + obtainer_id?: EntityId; + permanent_removal?: boolean | null; + proxy_account_id?: EntityId; + timestamp?: TimestampRange; +}; + diff --git a/src/utils/models/mirror-node-models/ContractAction.ts b/src/utils/models/mirror-node-models/ContractAction.ts new file mode 100644 index 00000000..1a1e1d2b --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractAction.ts @@ -0,0 +1,112 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { EvmAddressNullable } from './EvmAddressNullable'; +import type { Timestamp } from './Timestamp'; +export type ContractAction = { + /** + * The nesting depth of the call + */ + call_depth?: number; + /** + * The type of the call operation + */ + call_operation_type?: ContractAction.call_operation_type; + /** + * The type of the call + */ + call_type?: ContractAction.call_type; + caller?: EntityId; + /** + * The entity type of the caller + */ + caller_type?: ContractAction.caller_type; + /** + * The EVM address of the caller + */ + from?: string; + /** + * Gas cost in tinybars + */ + gas?: number; + /** + * Gas used in tinybars + */ + gas_used?: number; + /** + * The position of the action within the ordered list of actions + */ + index?: number; + /** + * The hex encoded input data + */ + input?: string | null; + recipient?: EntityId; + /** + * The entity type of the recipient + */ + recipient_type?: ContractAction.recipient_type | null; + /** + * The hex encoded result data + */ + result_data?: string | null; + /** + * The type of the result data + */ + result_data_type?: ContractAction.result_data_type; + timestamp?: Timestamp; + to?: EvmAddressNullable; + /** + * The value of the transaction in tinybars + */ + value?: number; +}; +export namespace ContractAction { + /** + * The type of the call operation + */ + export enum call_operation_type { + CALL = 'CALL', + CALLCODE = 'CALLCODE', + CREATE = 'CREATE', + CREATE2 = 'CREATE2', + DELEGATECALL = 'DELEGATECALL', + STATICCALL = 'STATICCALL', + UNKNOWN = 'UNKNOWN', + } + /** + * The type of the call + */ + export enum call_type { + NO_ACTION = 'NO_ACTION', + CALL = 'CALL', + CREATE = 'CREATE', + PRECOMPILE = 'PRECOMPILE', + SYSTEM = 'SYSTEM', + } + /** + * The entity type of the caller + */ + export enum caller_type { + ACCOUNT = 'ACCOUNT', + CONTRACT = 'CONTRACT', + } + /** + * The entity type of the recipient + */ + export enum recipient_type { + ACCOUNT = 'ACCOUNT', + CONTRACT = 'CONTRACT', + } + /** + * The type of the result data + */ + export enum result_data_type { + OUTPUT = 'OUTPUT', + REVERT_REASON = 'REVERT_REASON', + ERROR = 'ERROR', + } +} + diff --git a/src/utils/models/mirror-node-models/ContractActions.ts b/src/utils/models/mirror-node-models/ContractActions.ts new file mode 100644 index 00000000..e1a1d977 --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractActions.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ContractAction } from './ContractAction'; +export type ContractActions = Array; diff --git a/src/utils/models/mirror-node-models/ContractActionsResponse.ts b/src/utils/models/mirror-node-models/ContractActionsResponse.ts new file mode 100644 index 00000000..f73d0d9b --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractActionsResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ContractActions } from './ContractActions'; +import type { Links } from './Links'; +export type ContractActionsResponse = { + actions?: ContractActions; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/ContractCallRequest.ts b/src/utils/models/mirror-node-models/ContractCallRequest.ts new file mode 100644 index 00000000..627b82b8 --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractCallRequest.ts @@ -0,0 +1,39 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ContractCallRequest = { + /** + * Hexadecimal block number or the string "latest", "pending", "earliest". Defaults to "latest". + */ + block?: string | null; + /** + * Hexadecimal method signature and encoded parameters. Up to 24656 bytes as at most 49152 hexidecimal digits plus optional leading 0x. + */ + data?: Blob | null; + /** + * Whether gas estimation is called. Defaults to false. + */ + estimate?: boolean | null; + /** + * The 20-byte hexadecimal EVM address the transaction is sent from. + */ + from?: Blob | null; + /** + * Gas provided for the transaction execution. Defaults to 15000000. + */ + gas?: number | null; + /** + * Gas price used for each paid gas. + */ + gasPrice?: number | null; + /** + * The 20-byte hexadecimal EVM address the transaction is directed to. + */ + to: Blob; + /** + * Value sent with this transaction. Defaults to 0. + */ + value?: number | null; +}; + diff --git a/src/utils/models/mirror-node-models/ContractCallResponse.ts b/src/utils/models/mirror-node-models/ContractCallResponse.ts new file mode 100644 index 00000000..7dfe7dd3 --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractCallResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ContractCallResponse = { + /** + * Result in hexadecimal from executed contract call. + */ + result?: Blob; +}; + diff --git a/src/utils/models/mirror-node-models/ContractLog.ts b/src/utils/models/mirror-node-models/ContractLog.ts new file mode 100644 index 00000000..03250206 --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractLog.ts @@ -0,0 +1,28 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ContractResultLog } from './ContractResultLog'; +import type { EntityId } from './EntityId'; +import type { Timestamp } from './Timestamp'; +export type ContractLog = (ContractResultLog & { + /** + * The hex encoded block (record file chain) hash + */ + block_hash?: string; + /** + * The block height calculated as the number of record files starting from zero since network start. + */ + block_number?: number; + root_contract_id?: EntityId; + timestamp?: Timestamp; + /** + * A hex encoded transaction hash + */ + transaction_hash?: string; + /** + * The position of the transaction in the block + */ + transaction_index?: number | null; +}); + diff --git a/src/utils/models/mirror-node-models/ContractLogTopics.ts b/src/utils/models/mirror-node-models/ContractLogTopics.ts new file mode 100644 index 00000000..e6161ac1 --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractLogTopics.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * A list of hex encoded topics associated with this log event + */ +export type ContractLogTopics = Array; diff --git a/src/utils/models/mirror-node-models/ContractLogs.ts b/src/utils/models/mirror-node-models/ContractLogs.ts new file mode 100644 index 00000000..e7768e6b --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractLogs.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ContractLog } from './ContractLog'; +export type ContractLogs = Array; diff --git a/src/utils/models/mirror-node-models/ContractLogsResponse.ts b/src/utils/models/mirror-node-models/ContractLogsResponse.ts new file mode 100644 index 00000000..5d5d5635 --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractLogsResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ContractLogs } from './ContractLogs'; +import type { Links } from './Links'; +export type ContractLogsResponse = { + logs?: ContractLogs; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/ContractResponse.ts b/src/utils/models/mirror-node-models/ContractResponse.ts new file mode 100644 index 00000000..53a8982c --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractResponse.ts @@ -0,0 +1,16 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Contract } from './Contract'; +export type ContractResponse = (Contract & { + /** + * The contract bytecode in hex during deployment + */ + bytecode?: Blob | null; + /** + * The contract bytecode in hex after deployment + */ + runtime_bytecode?: Blob | null; +}); + diff --git a/src/utils/models/mirror-node-models/ContractResult.ts b/src/utils/models/mirror-node-models/ContractResult.ts new file mode 100644 index 00000000..de5bebfa --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractResult.ts @@ -0,0 +1,124 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Bloom } from './Bloom'; +import type { EntityId } from './EntityId'; +import type { EvmAddressNullable } from './EvmAddressNullable'; +import type { Timestamp } from './Timestamp'; +export type ContractResult = { + /** + * The hex encoded access_list of the wrapped ethereum transaction + */ + access_list?: string | null; + /** + * The hex encoded evm address of contract + */ + address?: string; + /** + * The number of tinybars sent to the function + */ + amount?: number | null; + /** + * The total amount of gas used in the block + */ + block_gas_used?: number | null; + /** + * The hex encoded block (record file chain) hash + */ + block_hash?: string | null; + /** + * The block height calculated as the number of record files starting from zero since network start. + */ + block_number?: number | null; + bloom?: Bloom; + /** + * The hex encoded result returned by the function + */ + call_result?: string | null; + /** + * The hex encoded chain_id of the wrapped ethereum transaction + */ + chain_id?: string | null; + contract_id?: EntityId; + /** + * The list of smart contracts that were created by the function call. + */ + created_contract_ids?: Array | null; + /** + * The message when an error occurs during smart contract execution + */ + error_message?: string | null; + /** + * The hex encoded initcode of a failed contract create transaction + */ + failed_initcode?: string; + from?: EvmAddressNullable; + /** + * The hex encoded parameters passed to the function + */ + function_parameters?: string | null; + /** + * The units of consumed gas by the EVM to execute contract + */ + gas_consumed?: number | null; + /** + * The maximum units of gas allowed for contract execution + */ + gas_limit?: number; + /** + * The hex encoded gas_price of the wrapped ethereum transaction + */ + gas_price?: string | null; + /** + * The units of gas used to execute contract + */ + gas_used?: number | null; + /** + * A hex encoded 32 byte hash and it is only populated for Ethereum transaction case + */ + hash?: string; + /** + * The hex encoded max_fee_per_gas of the wrapped ethereum transaction + */ + max_fee_per_gas?: string | null; + /** + * The hex encoded max_priority_fee_per_gas of the wrapped ethereum transaction + */ + max_priority_fee_per_gas?: string | null; + /** + * The nonce of the wrapped ethereum transaction + */ + nonce?: number | null; + /** + * The hex encoded signature_r of the wrapped ethereum transaction + */ + 'r'?: string | null; + /** + * The result of the transaction + */ + result?: string; + /** + * The hex encoded signature_s of the wrapped ethereum transaction + */ + 's'?: string | null; + /** + * The status of the transaction, 0x1 for a SUCCESS transaction and 0x0 for all else + */ + status?: string; + timestamp?: Timestamp; + to?: EvmAddressNullable; + /** + * The position of the transaction in the block + */ + transaction_index?: number | null; + /** + * The type of the wrapped ethereum transaction, 0 (Pre-Eip1559) or 2 (Post-Eip1559) + */ + type?: number | null; + /** + * The recovery_id of the wrapped ethereum transaction + */ + 'v'?: number | null; +}; + diff --git a/src/utils/models/mirror-node-models/ContractResultDetails.ts b/src/utils/models/mirror-node-models/ContractResultDetails.ts new file mode 100644 index 00000000..309480f9 --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractResultDetails.ts @@ -0,0 +1,80 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ContractResult } from './ContractResult'; +import type { ContractResultLogs } from './ContractResultLogs'; +import type { ContractResultStateChanges } from './ContractResultStateChanges'; +export type ContractResultDetails = (ContractResult & { + /** + * The hex encoded access_list of the wrapped ethereum transaction + */ + access_list?: string | null; + /** + * The hex encoded evm address of contract + */ + address?: string; + /** + * The total amount of gas used in the block + */ + block_gas_used?: number | null; + /** + * The hex encoded block (record file chain) hash + */ + block_hash?: string | null; + /** + * The block height calculated as the number of record files starting from zero since network start. + */ + block_number?: number | null; + /** + * The hex encoded chain_id of the wrapped ethereum transaction + */ + chain_id?: string | null; + /** + * The hex encoded initcode of a failed contract create transaction + */ + failed_initcode?: string; + /** + * The hex encoded gas_price of the wrapped ethereum transaction + */ + gas_price?: string | null; + /** + * The hex encoded transaction hash + */ + hash?: string; + logs?: ContractResultLogs; + /** + * The hex encoded max_fee_per_gas of the wrapped ethereum transaction + */ + max_fee_per_gas?: string | null; + /** + * The hex encoded max_priority_fee_per_gas of the wrapped ethereum transaction + */ + max_priority_fee_per_gas?: string | null; + /** + * The nonce of the wrapped ethereum transaction + */ + nonce?: number | null; + /** + * The hex encoded signature_r of the wrapped ethereum transaction + */ + 'r'?: string | null; + /** + * The hex encoded signature_s of the wrapped ethereum transaction + */ + 's'?: string | null; + state_changes?: ContractResultStateChanges; + /** + * The position of the transaction in the block + */ + transaction_index?: number | null; + /** + * The type of the wrapped ethereum transaction, 0 (Pre-Eip1559) or 2 (Post-Eip1559) + */ + type?: number | null; + /** + * The recovery_id of the wrapped ethereum transaction + */ + 'v'?: number | null; +}); + diff --git a/src/utils/models/mirror-node-models/ContractResultLog.ts b/src/utils/models/mirror-node-models/ContractResultLog.ts new file mode 100644 index 00000000..88b5d10b --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractResultLog.ts @@ -0,0 +1,25 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Bloom } from './Bloom'; +import type { ContractLogTopics } from './ContractLogTopics'; +import type { EntityId } from './EntityId'; +export type ContractResultLog = { + /** + * The hex encoded EVM address of the contract + */ + address?: string; + bloom?: Bloom; + contract_id?: EntityId; + /** + * The hex encoded data of the contract log + */ + data?: string | null; + /** + * The index of the contract log in the chain of logs for an execution + */ + index?: number; + topics?: ContractLogTopics; +}; + diff --git a/src/utils/models/mirror-node-models/ContractResultLogs.ts b/src/utils/models/mirror-node-models/ContractResultLogs.ts new file mode 100644 index 00000000..cedf4433 --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractResultLogs.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ContractResultLog } from './ContractResultLog'; +export type ContractResultLogs = Array; diff --git a/src/utils/models/mirror-node-models/ContractResultStateChange.ts b/src/utils/models/mirror-node-models/ContractResultStateChange.ts new file mode 100644 index 00000000..32fe6058 --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractResultStateChange.ts @@ -0,0 +1,23 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { EvmAddress } from './EvmAddress'; +export type ContractResultStateChange = { + address?: EvmAddress; + contract_id?: EntityId; + /** + * The hex encoded storage slot changed. + */ + slot?: Blob; + /** + * The hex encoded value read from the storage slot. + */ + value_read?: Blob; + /** + * The hex encoded value written to the slot. `null` implies no value written. + */ + value_written?: Blob | null; +}; + diff --git a/src/utils/models/mirror-node-models/ContractResultStateChanges.ts b/src/utils/models/mirror-node-models/ContractResultStateChanges.ts new file mode 100644 index 00000000..feab5e64 --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractResultStateChanges.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ContractResultStateChange } from './ContractResultStateChange'; +export type ContractResultStateChanges = Array; diff --git a/src/utils/models/mirror-node-models/ContractResults.ts b/src/utils/models/mirror-node-models/ContractResults.ts new file mode 100644 index 00000000..4a1e1c03 --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractResults.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ContractResult } from './ContractResult'; +export type ContractResults = Array; diff --git a/src/utils/models/mirror-node-models/ContractResultsResponse.ts b/src/utils/models/mirror-node-models/ContractResultsResponse.ts new file mode 100644 index 00000000..c3e0b4a4 --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractResultsResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ContractResults } from './ContractResults'; +import type { Links } from './Links'; +export type ContractResultsResponse = { + results?: ContractResults; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/ContractState.ts b/src/utils/models/mirror-node-models/ContractState.ts new file mode 100644 index 00000000..3d15ff2b --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractState.ts @@ -0,0 +1,21 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { EvmAddress } from './EvmAddress'; +import type { Timestamp } from './Timestamp'; +export type ContractState = { + address: EvmAddress; + contract_id: EntityId; + timestamp: Timestamp; + /** + * The hex encoded storage slot. + */ + slot: Blob; + /** + * The hex encoded value to the slot. `0x` implies no value written. + */ + value: Blob; +}; + diff --git a/src/utils/models/mirror-node-models/ContractStateResponse.ts b/src/utils/models/mirror-node-models/ContractStateResponse.ts new file mode 100644 index 00000000..c9a4c0ee --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractStateResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ContractState } from './ContractState'; +import type { Links } from './Links'; +export type ContractStateResponse = { + state?: Array; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/Contracts.ts b/src/utils/models/mirror-node-models/Contracts.ts new file mode 100644 index 00000000..c61bfca1 --- /dev/null +++ b/src/utils/models/mirror-node-models/Contracts.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Contract } from './Contract'; +export type Contracts = Array; diff --git a/src/utils/models/mirror-node-models/ContractsResponse.ts b/src/utils/models/mirror-node-models/ContractsResponse.ts new file mode 100644 index 00000000..710e6eb7 --- /dev/null +++ b/src/utils/models/mirror-node-models/ContractsResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Contracts } from './Contracts'; +import type { Links } from './Links'; +export type ContractsResponse = { + contracts?: Contracts; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/CryptoAllowance.ts b/src/utils/models/mirror-node-models/CryptoAllowance.ts new file mode 100644 index 00000000..2ed8b9c7 --- /dev/null +++ b/src/utils/models/mirror-node-models/CryptoAllowance.ts @@ -0,0 +1,7 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Allowance } from './Allowance'; +export type CryptoAllowance = Allowance; + diff --git a/src/utils/models/mirror-node-models/CryptoAllowances.ts b/src/utils/models/mirror-node-models/CryptoAllowances.ts new file mode 100644 index 00000000..adf6e1f5 --- /dev/null +++ b/src/utils/models/mirror-node-models/CryptoAllowances.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CryptoAllowance } from './CryptoAllowance'; +export type CryptoAllowances = Array; diff --git a/src/utils/models/mirror-node-models/CryptoAllowancesResponse.ts b/src/utils/models/mirror-node-models/CryptoAllowancesResponse.ts new file mode 100644 index 00000000..42af5c9b --- /dev/null +++ b/src/utils/models/mirror-node-models/CryptoAllowancesResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CryptoAllowances } from './CryptoAllowances'; +import type { Links } from './Links'; +export type CryptoAllowancesResponse = { + allowances?: CryptoAllowances; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/CustomFees.ts b/src/utils/models/mirror-node-models/CustomFees.ts new file mode 100644 index 00000000..a94dd1c1 --- /dev/null +++ b/src/utils/models/mirror-node-models/CustomFees.ts @@ -0,0 +1,15 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { FixedFee } from './FixedFee'; +import type { FractionalFee } from './FractionalFee'; +import type { RoyaltyFee } from './RoyaltyFee'; +import type { Timestamp } from './Timestamp'; +export type CustomFees = { + created_timestamp?: Timestamp; + fixed_fees?: Array; + fractional_fees?: Array; + royalty_fees?: Array; +}; + diff --git a/src/utils/models/mirror-node-models/EntityId.ts b/src/utils/models/mirror-node-models/EntityId.ts new file mode 100644 index 00000000..dc8f01a7 --- /dev/null +++ b/src/utils/models/mirror-node-models/EntityId.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Network entity ID in the format of `shard.realm.num` + */ +export type EntityId = string | null; diff --git a/src/utils/models/mirror-node-models/EntityIdQuery.ts b/src/utils/models/mirror-node-models/EntityIdQuery.ts new file mode 100644 index 00000000..839cfd4a --- /dev/null +++ b/src/utils/models/mirror-node-models/EntityIdQuery.ts @@ -0,0 +1,5 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type EntityIdQuery = string; diff --git a/src/utils/models/mirror-node-models/Error.ts b/src/utils/models/mirror-node-models/Error.ts new file mode 100644 index 00000000..94ee35b5 --- /dev/null +++ b/src/utils/models/mirror-node-models/Error.ts @@ -0,0 +1,23 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type Error = { + _status?: { + messages?: Array<{ + /** + * Error message in hexadecimal + */ + data?: Blob | null; + /** + * Detailed error message + */ + detail?: string | null; + /** + * Error message + */ + message?: string; + }>; + }; +}; + diff --git a/src/utils/models/mirror-node-models/EthereumHash.ts b/src/utils/models/mirror-node-models/EthereumHash.ts new file mode 100644 index 00000000..79801c85 --- /dev/null +++ b/src/utils/models/mirror-node-models/EthereumHash.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * A hex encoded ethereum transaction hash. + */ +export type EthereumHash = string; diff --git a/src/utils/models/mirror-node-models/EvmAddress.ts b/src/utils/models/mirror-node-models/EvmAddress.ts new file mode 100644 index 00000000..1c910732 --- /dev/null +++ b/src/utils/models/mirror-node-models/EvmAddress.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * A network entity encoded as an EVM address in hex. + */ +export type EvmAddress = Blob; diff --git a/src/utils/models/mirror-node-models/EvmAddressNullable.ts b/src/utils/models/mirror-node-models/EvmAddressNullable.ts new file mode 100644 index 00000000..3be99341 --- /dev/null +++ b/src/utils/models/mirror-node-models/EvmAddressNullable.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * A network entity encoded as an EVM address in hex. + */ +export type EvmAddressNullable = Blob | null; diff --git a/src/utils/models/mirror-node-models/EvmAddressWithShardRealm.ts b/src/utils/models/mirror-node-models/EvmAddressWithShardRealm.ts new file mode 100644 index 00000000..98d87b8f --- /dev/null +++ b/src/utils/models/mirror-node-models/EvmAddressWithShardRealm.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * A network entity encoded as an EVM address in hex. + */ +export type EvmAddressWithShardRealm = Blob; diff --git a/src/utils/models/mirror-node-models/ExchangeRate.ts b/src/utils/models/mirror-node-models/ExchangeRate.ts new file mode 100644 index 00000000..0c411e54 --- /dev/null +++ b/src/utils/models/mirror-node-models/ExchangeRate.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ExchangeRate = { + cent_equivalent?: number; + expiration_time?: number; + hbar_equivalent?: number; +}; + diff --git a/src/utils/models/mirror-node-models/FixedFee.ts b/src/utils/models/mirror-node-models/FixedFee.ts new file mode 100644 index 00000000..b1f6af36 --- /dev/null +++ b/src/utils/models/mirror-node-models/FixedFee.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +export type FixedFee = { + all_collectors_are_exempt?: boolean; + amount?: number; + collector_account_id?: EntityId; + denominating_token_id?: EntityId; +}; + diff --git a/src/utils/models/mirror-node-models/FractionalFee.ts b/src/utils/models/mirror-node-models/FractionalFee.ts new file mode 100644 index 00000000..d9c0a474 --- /dev/null +++ b/src/utils/models/mirror-node-models/FractionalFee.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +export type FractionalFee = { + all_collectors_are_exempt?: boolean; + amount?: { + numerator?: number; + denominator?: number; + }; + collector_account_id?: EntityId; + denominating_token_id?: EntityId; + maximum?: number | null; + minimum?: number; + net_of_transfers?: boolean; +}; + diff --git a/src/utils/models/mirror-node-models/HederaHash.ts b/src/utils/models/mirror-node-models/HederaHash.ts new file mode 100644 index 00000000..c45bf0cf --- /dev/null +++ b/src/utils/models/mirror-node-models/HederaHash.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * A hex encoded hedera transaction hash. + */ +export type HederaHash = string; diff --git a/src/utils/models/mirror-node-models/Key.ts b/src/utils/models/mirror-node-models/Key.ts new file mode 100644 index 00000000..c9fcebea --- /dev/null +++ b/src/utils/models/mirror-node-models/Key.ts @@ -0,0 +1,19 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The public key which controls access to various network entities. + */ +export type Key = { + _type?: Key._type; + key?: string; +}; +export namespace Key { + export enum _type { + ECDSA_SECP256K1 = 'ECDSA_SECP256K1', + ED25519 = 'ED25519', + PROTOBUF_ENCODED = 'ProtobufEncoded', + } +} + diff --git a/src/utils/models/mirror-node-models/Links.ts b/src/utils/models/mirror-node-models/Links.ts new file mode 100644 index 00000000..2dfd2e22 --- /dev/null +++ b/src/utils/models/mirror-node-models/Links.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type Links = { + next?: string | null; +}; + diff --git a/src/utils/models/mirror-node-models/LogTopicQueryParam.ts b/src/utils/models/mirror-node-models/LogTopicQueryParam.ts new file mode 100644 index 00000000..eb689caa --- /dev/null +++ b/src/utils/models/mirror-node-models/LogTopicQueryParam.ts @@ -0,0 +1,5 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type LogTopicQueryParam = Array; diff --git a/src/utils/models/mirror-node-models/NetworkExchangeRateSetResponse.ts b/src/utils/models/mirror-node-models/NetworkExchangeRateSetResponse.ts new file mode 100644 index 00000000..4df5efeb --- /dev/null +++ b/src/utils/models/mirror-node-models/NetworkExchangeRateSetResponse.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ExchangeRate } from './ExchangeRate'; +import type { Timestamp } from './Timestamp'; +export type NetworkExchangeRateSetResponse = { + current_rate?: ExchangeRate; + next_rate?: ExchangeRate; + timestamp?: Timestamp; +}; + diff --git a/src/utils/models/mirror-node-models/NetworkFee.ts b/src/utils/models/mirror-node-models/NetworkFee.ts new file mode 100644 index 00000000..4300c1ad --- /dev/null +++ b/src/utils/models/mirror-node-models/NetworkFee.ts @@ -0,0 +1,15 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type NetworkFee = { + /** + * gas cost in tinybars + */ + gas?: number; + /** + * type of the transaction + */ + transaction_type?: string; +}; + diff --git a/src/utils/models/mirror-node-models/NetworkFees.ts b/src/utils/models/mirror-node-models/NetworkFees.ts new file mode 100644 index 00000000..4e2a9223 --- /dev/null +++ b/src/utils/models/mirror-node-models/NetworkFees.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { NetworkFee } from './NetworkFee'; +export type NetworkFees = Array; diff --git a/src/utils/models/mirror-node-models/NetworkFeesResponse.ts b/src/utils/models/mirror-node-models/NetworkFeesResponse.ts new file mode 100644 index 00000000..d00c1419 --- /dev/null +++ b/src/utils/models/mirror-node-models/NetworkFeesResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { NetworkFees } from './NetworkFees'; +import type { Timestamp } from './Timestamp'; +export type NetworkFeesResponse = { + fees?: NetworkFees; + timestamp?: Timestamp; +}; + diff --git a/src/utils/models/mirror-node-models/NetworkNode.ts b/src/utils/models/mirror-node-models/NetworkNode.ts new file mode 100644 index 00000000..12ee4025 --- /dev/null +++ b/src/utils/models/mirror-node-models/NetworkNode.ts @@ -0,0 +1,67 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { Key } from './Key'; +import type { ServiceEndpoints } from './ServiceEndpoints'; +import type { TimestampRange } from './TimestampRange'; +import type { TimestampRangeNullable } from './TimestampRangeNullable'; +export type NetworkNode = { + admin_key: Key; + /** + * a memo associated with the address book + */ + description: string | null; + file_id: EntityId; + /** + * The maximum stake (rewarded or not rewarded) this node can have as consensus weight + */ + max_stake: number | null; + /** + * memo + */ + memo: string | null; + /** + * The minimum stake (rewarded or not rewarded) this node must reach before having non-zero consensus weight + * + */ + min_stake: number | null; + node_account_id: EntityId; + /** + * An identifier for the node + */ + node_id: number; + /** + * hex encoded hash of the node's TLS certificate + */ + node_cert_hash: string | null; + /** + * hex encoded X509 RSA public key used to verify stream file signature + */ + public_key: string | null; + /** + * The total tinybars earned by this node per whole hbar in the last staking period + */ + reward_rate_start: number | null; + service_endpoints: ServiceEndpoints; + /** + * The node consensus weight at the beginning of the staking period + */ + stake: number | null; + /** + * The sum (balance + stakedToMe) for all accounts staked to this node with declineReward=true at the + * beginning of the staking period + * + */ + stake_not_rewarded: number | null; + /** + * The sum (balance + staked) for all accounts staked to the node that are not declining rewards at the + * beginning of the staking period + * + */ + stake_rewarded: number | null; + staking_period: TimestampRangeNullable; + timestamp: TimestampRange; +}; + diff --git a/src/utils/models/mirror-node-models/NetworkNodes.ts b/src/utils/models/mirror-node-models/NetworkNodes.ts new file mode 100644 index 00000000..03b5d7e7 --- /dev/null +++ b/src/utils/models/mirror-node-models/NetworkNodes.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { NetworkNode } from './NetworkNode'; +export type NetworkNodes = Array; diff --git a/src/utils/models/mirror-node-models/NetworkNodesResponse.ts b/src/utils/models/mirror-node-models/NetworkNodesResponse.ts new file mode 100644 index 00000000..6d49da81 --- /dev/null +++ b/src/utils/models/mirror-node-models/NetworkNodesResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Links } from './Links'; +import type { NetworkNodes } from './NetworkNodes'; +export type NetworkNodesResponse = { + nodes: NetworkNodes; + links: Links; +}; + diff --git a/src/utils/models/mirror-node-models/NetworkStakeResponse.ts b/src/utils/models/mirror-node-models/NetworkStakeResponse.ts new file mode 100644 index 00000000..cf36e759 --- /dev/null +++ b/src/utils/models/mirror-node-models/NetworkStakeResponse.ts @@ -0,0 +1,71 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { TimestampRange } from './TimestampRange'; +export type NetworkStakeResponse = { + /** + * The maximum amount of tinybar that can be staked for reward while still achieving + * the maximum per-hbar reward rate + * + */ + max_stake_rewarded: number; + /** + * The maximum reward rate, in tinybars per whole hbar, that any account can receive in a day + */ + max_staking_reward_rate_per_hbar: number; + /** + * The total tinybars to be paid as staking rewards in the ending period, + * after applying the settings for the 0.0.800 balance threshold and the maximum stake rewarded + * + */ + max_total_reward: number; + /** + * The fraction between zero and one of the network and service fees paid to the node reward account 0.0.801 + */ + node_reward_fee_fraction: number; + /** + * The amount of the staking reward funds of account 0.0.800 reserved to pay pending + * rewards that have been earned but not collected + * + */ + reserved_staking_rewards: number; + /** + * The unreserved tinybar balance of account 0.0.800 required to achieve the + * maximum per-hbar reward rate + * + */ + reward_balance_threshold: number; + /** + * The total amount staked to the network in tinybars the start of the current staking period + */ + stake_total: number; + staking_period: TimestampRange; + /** + * The number of minutes in a staking period + */ + staking_period_duration: number; + /** + * The number of staking periods for which the reward is stored for each node + */ + staking_periods_stored: number; + /** + * The fraction between zero and one of the network and service fees paid to the staking reward account 0.0.800 + */ + staking_reward_fee_fraction: number; + /** + * The total number of tinybars to be distributed as staking rewards each period + */ + staking_reward_rate: number; + /** + * The minimum balance of staking reward account 0.0.800 required to active rewards + */ + staking_start_threshold: number; + /** + * The unreserved balance of account 0.0.800 at the close of the just-ending period; + * this value is used to compute the HIP-782 balance ratio + * + */ + unreserved_staking_reward_balance: number; +}; + diff --git a/src/utils/models/mirror-node-models/NetworkSupplyResponse.ts b/src/utils/models/mirror-node-models/NetworkSupplyResponse.ts new file mode 100644 index 00000000..2195fe00 --- /dev/null +++ b/src/utils/models/mirror-node-models/NetworkSupplyResponse.ts @@ -0,0 +1,17 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Timestamp } from './Timestamp'; +export type NetworkSupplyResponse = { + /** + * The network's released supply of hbars in tinybars + */ + released_supply?: string; + timestamp?: Timestamp; + /** + * The network's total supply of hbars in tinybars + */ + total_supply?: string; +}; + diff --git a/src/utils/models/mirror-node-models/Nft.ts b/src/utils/models/mirror-node-models/Nft.ts new file mode 100644 index 00000000..608bf7cd --- /dev/null +++ b/src/utils/models/mirror-node-models/Nft.ts @@ -0,0 +1,24 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { TimestampNullable } from './TimestampNullable'; +export type Nft = { + account_id?: EntityId; + created_timestamp?: TimestampNullable; + delegating_spender?: EntityId; + /** + * whether the nft or the token it belongs to has been deleted + */ + deleted?: boolean; + /** + * Arbitrary binary data associated with this NFT encoded in base64. + */ + metadata?: string; + modified_timestamp?: TimestampNullable; + serial_number?: number; + spender?: EntityId; + token_id?: EntityId; +}; + diff --git a/src/utils/models/mirror-node-models/NftAllowance.ts b/src/utils/models/mirror-node-models/NftAllowance.ts new file mode 100644 index 00000000..dd4688cb --- /dev/null +++ b/src/utils/models/mirror-node-models/NftAllowance.ts @@ -0,0 +1,17 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { TimestampRange } from './TimestampRange'; +export type NftAllowance = { + /** + * A boolean value indicating if the spender has the allowance to spend all NFTs owned by the given owner + */ + approved_for_all: boolean; + owner: EntityId; + spender: EntityId; + timestamp: TimestampRange; + token_id: EntityId; +}; + diff --git a/src/utils/models/mirror-node-models/NftAllowances.ts b/src/utils/models/mirror-node-models/NftAllowances.ts new file mode 100644 index 00000000..d299591d --- /dev/null +++ b/src/utils/models/mirror-node-models/NftAllowances.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { NftAllowance } from './NftAllowance'; +export type NftAllowances = Array; diff --git a/src/utils/models/mirror-node-models/NftAllowancesResponse.ts b/src/utils/models/mirror-node-models/NftAllowancesResponse.ts new file mode 100644 index 00000000..f424de6f --- /dev/null +++ b/src/utils/models/mirror-node-models/NftAllowancesResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Links } from './Links'; +import type { NftAllowances } from './NftAllowances'; +export type NftAllowancesResponse = { + allowances?: NftAllowances; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/NftTransactionHistory.ts b/src/utils/models/mirror-node-models/NftTransactionHistory.ts new file mode 100644 index 00000000..fc3ec253 --- /dev/null +++ b/src/utils/models/mirror-node-models/NftTransactionHistory.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Links } from './Links'; +import type { NftTransactionTransfer } from './NftTransactionTransfer'; +export type NftTransactionHistory = { + transactions: Array; + links: Links; +}; + diff --git a/src/utils/models/mirror-node-models/NftTransactionTransfer.ts b/src/utils/models/mirror-node-models/NftTransactionTransfer.ts new file mode 100644 index 00000000..9cfa16e7 --- /dev/null +++ b/src/utils/models/mirror-node-models/NftTransactionTransfer.ts @@ -0,0 +1,17 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { Timestamp } from './Timestamp'; +import type { TransactionTypes } from './TransactionTypes'; +export type NftTransactionTransfer = { + consensus_timestamp: Timestamp; + is_approval: boolean; + nonce: number; + receiver_account_id: EntityId; + sender_account_id: EntityId; + transaction_id: string; + type: TransactionTypes; +}; + diff --git a/src/utils/models/mirror-node-models/Nfts.ts b/src/utils/models/mirror-node-models/Nfts.ts new file mode 100644 index 00000000..40174240 --- /dev/null +++ b/src/utils/models/mirror-node-models/Nfts.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Links } from './Links'; +import type { Nft } from './Nft'; +export type Nfts = { + nfts?: Array; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/Opcode.ts b/src/utils/models/mirror-node-models/Opcode.ts new file mode 100644 index 00000000..7297ceb9 --- /dev/null +++ b/src/utils/models/mirror-node-models/Opcode.ts @@ -0,0 +1,46 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Represents a struct/opcode log entry in a trace + */ +export type Opcode = { + /** + * The current call depth + */ + depth: number; + /** + * The remaining gas + */ + gas: number; + /** + * The cost for executing op + */ + gas_cost: number; + /** + * The EVM memory with items in hex + */ + memory: Array | null; + /** + * The opcode to execute + */ + op: string; + /** + * The program counter + */ + pc: number; + /** + * The revert reason in hex + */ + reason?: Blob | null; + /** + * The EVM stack with items in hex + */ + stack: Array | null; + /** + * The storage slots (keys and values in hex) of the current contract which is read from and written to + */ + storage: Record | null; +}; + diff --git a/src/utils/models/mirror-node-models/OpcodesResponse.ts b/src/utils/models/mirror-node-models/OpcodesResponse.ts new file mode 100644 index 00000000..7b741cbb --- /dev/null +++ b/src/utils/models/mirror-node-models/OpcodesResponse.ts @@ -0,0 +1,32 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { Opcode } from './Opcode'; +export type OpcodesResponse = { + /** + * The address of the transaction recipient in hex. + * Zero address is set for transactions without a recipient (e.g., contract create) + * + */ + address: Blob; + contract_id: EntityId; + /** + * Whether the transaction failed to be completely processed. + */ + failed: boolean; + /** + * The gas used in tinybars + */ + gas: number; + /** + * The logs produced by the opcode logger + */ + opcodes: Array; + /** + * The returned data from the transaction in hex + */ + return_value: Blob; +}; + diff --git a/src/utils/models/mirror-node-models/PositiveNumber.ts b/src/utils/models/mirror-node-models/PositiveNumber.ts new file mode 100644 index 00000000..d88efe28 --- /dev/null +++ b/src/utils/models/mirror-node-models/PositiveNumber.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * A positive number. + */ +export type PositiveNumber = number; diff --git a/src/utils/models/mirror-node-models/RoyaltyFee.ts b/src/utils/models/mirror-node-models/RoyaltyFee.ts new file mode 100644 index 00000000..6365c007 --- /dev/null +++ b/src/utils/models/mirror-node-models/RoyaltyFee.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +export type RoyaltyFee = { + all_collectors_are_exempt?: boolean; + amount?: { + numerator?: number; + denominator?: number; + }; + collector_account_id?: EntityId; + fallback_fee?: { + amount?: number; + denominating_token_id?: EntityId; + }; +}; + diff --git a/src/utils/models/mirror-node-models/Schedule.ts b/src/utils/models/mirror-node-models/Schedule.ts new file mode 100644 index 00000000..f23167ba --- /dev/null +++ b/src/utils/models/mirror-node-models/Schedule.ts @@ -0,0 +1,24 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { Key } from './Key'; +import type { ScheduleSignature } from './ScheduleSignature'; +import type { Timestamp } from './Timestamp'; +import type { TimestampNullable } from './TimestampNullable'; +export type Schedule = { + admin_key?: Key; + consensus_timestamp?: Timestamp; + creator_account_id?: EntityId; + deleted?: boolean; + executed_timestamp?: TimestampNullable; + expiration_time?: TimestampNullable; + memo?: string; + payer_account_id?: EntityId; + schedule_id?: EntityId; + signatures?: Array; + transaction_body?: string; + wait_for_expiry?: boolean; +}; + diff --git a/src/utils/models/mirror-node-models/ScheduleSignature.ts b/src/utils/models/mirror-node-models/ScheduleSignature.ts new file mode 100644 index 00000000..b2f16dab --- /dev/null +++ b/src/utils/models/mirror-node-models/ScheduleSignature.ts @@ -0,0 +1,22 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Timestamp } from './Timestamp'; +export type ScheduleSignature = { + consensus_timestamp?: Timestamp; + public_key_prefix?: string; + signature?: string; + type?: ScheduleSignature.type; +}; +export namespace ScheduleSignature { + export enum type { + CONTRACT = 'CONTRACT', + ED25519 = 'ED25519', + RSA_3072 = 'RSA_3072', + ECDSA_384 = 'ECDSA_384', + ECDSA_SECP256K1 = 'ECDSA_SECP256K1', + UNKNOWN = 'UNKNOWN', + } +} + diff --git a/src/utils/models/mirror-node-models/Schedules.ts b/src/utils/models/mirror-node-models/Schedules.ts new file mode 100644 index 00000000..4bae6c59 --- /dev/null +++ b/src/utils/models/mirror-node-models/Schedules.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Schedule } from './Schedule'; +export type Schedules = Array; diff --git a/src/utils/models/mirror-node-models/SchedulesResponse.ts b/src/utils/models/mirror-node-models/SchedulesResponse.ts new file mode 100644 index 00000000..7d5d94fe --- /dev/null +++ b/src/utils/models/mirror-node-models/SchedulesResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Links } from './Links'; +import type { Schedules } from './Schedules'; +export type SchedulesResponse = { + schedules?: Schedules; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/ServiceEndpoint.ts b/src/utils/models/mirror-node-models/ServiceEndpoint.ts new file mode 100644 index 00000000..9c076a87 --- /dev/null +++ b/src/utils/models/mirror-node-models/ServiceEndpoint.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ServiceEndpoint = { + domain_name: string; + ip_address_v4: string; + port: number; +}; + diff --git a/src/utils/models/mirror-node-models/ServiceEndpoints.ts b/src/utils/models/mirror-node-models/ServiceEndpoints.ts new file mode 100644 index 00000000..a16430e3 --- /dev/null +++ b/src/utils/models/mirror-node-models/ServiceEndpoints.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ServiceEndpoint } from './ServiceEndpoint'; +export type ServiceEndpoints = Array; diff --git a/src/utils/models/mirror-node-models/StakingReward.ts b/src/utils/models/mirror-node-models/StakingReward.ts new file mode 100644 index 00000000..61f87038 --- /dev/null +++ b/src/utils/models/mirror-node-models/StakingReward.ts @@ -0,0 +1,15 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { Timestamp } from './Timestamp'; +export type StakingReward = { + account_id: EntityId; + /** + * The number of tinybars awarded + */ + amount: number; + timestamp: Timestamp; +}; + diff --git a/src/utils/models/mirror-node-models/StakingRewardTransfer.ts b/src/utils/models/mirror-node-models/StakingRewardTransfer.ts new file mode 100644 index 00000000..b161263a --- /dev/null +++ b/src/utils/models/mirror-node-models/StakingRewardTransfer.ts @@ -0,0 +1,16 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +/** + * A staking reward transfer + */ +export type StakingRewardTransfer = { + account: EntityId; + /** + * The number of tinybars awarded + */ + amount: number; +}; + diff --git a/src/utils/models/mirror-node-models/StakingRewardTransfers.ts b/src/utils/models/mirror-node-models/StakingRewardTransfers.ts new file mode 100644 index 00000000..2cf69b07 --- /dev/null +++ b/src/utils/models/mirror-node-models/StakingRewardTransfers.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { StakingRewardTransfer } from './StakingRewardTransfer'; +export type StakingRewardTransfers = Array; diff --git a/src/utils/models/mirror-node-models/StakingRewardsResponse.ts b/src/utils/models/mirror-node-models/StakingRewardsResponse.ts new file mode 100644 index 00000000..4a1427bc --- /dev/null +++ b/src/utils/models/mirror-node-models/StakingRewardsResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Links } from './Links'; +import type { StakingReward } from './StakingReward'; +export type StakingRewardsResponse = { + rewards?: Array; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/Timestamp.ts b/src/utils/models/mirror-node-models/Timestamp.ts new file mode 100644 index 00000000..557f1c6e --- /dev/null +++ b/src/utils/models/mirror-node-models/Timestamp.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * A Unix timestamp in seconds.nanoseconds format + */ +export type Timestamp = string; diff --git a/src/utils/models/mirror-node-models/TimestampNullable.ts b/src/utils/models/mirror-node-models/TimestampNullable.ts new file mode 100644 index 00000000..4bd611ad --- /dev/null +++ b/src/utils/models/mirror-node-models/TimestampNullable.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * A Unix timestamp in seconds.nanoseconds format + */ +export type TimestampNullable = string | null; diff --git a/src/utils/models/mirror-node-models/TimestampRange.ts b/src/utils/models/mirror-node-models/TimestampRange.ts new file mode 100644 index 00000000..8d7de704 --- /dev/null +++ b/src/utils/models/mirror-node-models/TimestampRange.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Timestamp } from './Timestamp'; +import type { TimestampNullable } from './TimestampNullable'; +/** + * A timestamp range an entity is valid for + */ +export type TimestampRange = { + from?: Timestamp; + to?: TimestampNullable; +}; + diff --git a/src/utils/models/mirror-node-models/TimestampRangeNullable.ts b/src/utils/models/mirror-node-models/TimestampRangeNullable.ts new file mode 100644 index 00000000..d49b672f --- /dev/null +++ b/src/utils/models/mirror-node-models/TimestampRangeNullable.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Timestamp } from './Timestamp'; +import type { TimestampNullable } from './TimestampNullable'; +/** + * A timestamp range an entity is valid for + */ +export type TimestampRangeNullable = { + from?: Timestamp; + to?: TimestampNullable; +}; + diff --git a/src/utils/models/mirror-node-models/Token.ts b/src/utils/models/mirror-node-models/Token.ts new file mode 100644 index 00000000..d49f4717 --- /dev/null +++ b/src/utils/models/mirror-node-models/Token.ts @@ -0,0 +1,19 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { Key } from './Key'; +export type Token = { + admin_key: Key; + decimals: number; + /** + * Arbitrary binary data associated with this token class encoded in base64. + */ + metadata?: string; + name: string; + symbol: string; + token_id: EntityId; + type: string; +}; + diff --git a/src/utils/models/mirror-node-models/TokenAirdrop.ts b/src/utils/models/mirror-node-models/TokenAirdrop.ts new file mode 100644 index 00000000..4f9425f8 --- /dev/null +++ b/src/utils/models/mirror-node-models/TokenAirdrop.ts @@ -0,0 +1,15 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { TimestampRange } from './TimestampRange'; +export type TokenAirdrop = { + amount: number; + receiver_id: EntityId; + sender_id: EntityId; + serial_number?: number | null; + timestamp: TimestampRange; + token_id: EntityId; +}; + diff --git a/src/utils/models/mirror-node-models/TokenAirdrops.ts b/src/utils/models/mirror-node-models/TokenAirdrops.ts new file mode 100644 index 00000000..a001acbe --- /dev/null +++ b/src/utils/models/mirror-node-models/TokenAirdrops.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { TokenAirdrop } from './TokenAirdrop'; +export type TokenAirdrops = Array; diff --git a/src/utils/models/mirror-node-models/TokenAirdropsResponse.ts b/src/utils/models/mirror-node-models/TokenAirdropsResponse.ts new file mode 100644 index 00000000..6146bc09 --- /dev/null +++ b/src/utils/models/mirror-node-models/TokenAirdropsResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Links } from './Links'; +import type { TokenAirdrops } from './TokenAirdrops'; +export type TokenAirdropsResponse = { + airdrops?: TokenAirdrops; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/TokenAllowance.ts b/src/utils/models/mirror-node-models/TokenAllowance.ts new file mode 100644 index 00000000..fd92f018 --- /dev/null +++ b/src/utils/models/mirror-node-models/TokenAllowance.ts @@ -0,0 +1,7 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Allowance } from './Allowance'; +export type TokenAllowance = Allowance; + diff --git a/src/utils/models/mirror-node-models/TokenAllowances.ts b/src/utils/models/mirror-node-models/TokenAllowances.ts new file mode 100644 index 00000000..9e36c300 --- /dev/null +++ b/src/utils/models/mirror-node-models/TokenAllowances.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { TokenAllowance } from './TokenAllowance'; +export type TokenAllowances = Array; diff --git a/src/utils/models/mirror-node-models/TokenAllowancesResponse.ts b/src/utils/models/mirror-node-models/TokenAllowancesResponse.ts new file mode 100644 index 00000000..2908d24d --- /dev/null +++ b/src/utils/models/mirror-node-models/TokenAllowancesResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Links } from './Links'; +import type { TokenAllowances } from './TokenAllowances'; +export type TokenAllowancesResponse = { + allowances?: TokenAllowances; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/TokenBalance.ts b/src/utils/models/mirror-node-models/TokenBalance.ts new file mode 100644 index 00000000..6f4ee38d --- /dev/null +++ b/src/utils/models/mirror-node-models/TokenBalance.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +export type TokenBalance = { + token_id: EntityId; + balance: number; +}; + diff --git a/src/utils/models/mirror-node-models/TokenBalancesResponse.ts b/src/utils/models/mirror-node-models/TokenBalancesResponse.ts new file mode 100644 index 00000000..5a145172 --- /dev/null +++ b/src/utils/models/mirror-node-models/TokenBalancesResponse.ts @@ -0,0 +1,13 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Links } from './Links'; +import type { TimestampNullable } from './TimestampNullable'; +import type { TokenDistribution } from './TokenDistribution'; +export type TokenBalancesResponse = { + timestamp?: TimestampNullable; + balances?: TokenDistribution; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/TokenDistribution.ts b/src/utils/models/mirror-node-models/TokenDistribution.ts new file mode 100644 index 00000000..42d783e1 --- /dev/null +++ b/src/utils/models/mirror-node-models/TokenDistribution.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +export type TokenDistribution = Array<{ + account: EntityId; + balance: number; + decimals: number; +}>; diff --git a/src/utils/models/mirror-node-models/TokenInfo.ts b/src/utils/models/mirror-node-models/TokenInfo.ts new file mode 100644 index 00000000..5a06dab7 --- /dev/null +++ b/src/utils/models/mirror-node-models/TokenInfo.ts @@ -0,0 +1,58 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CustomFees } from './CustomFees'; +import type { EntityId } from './EntityId'; +import type { Key } from './Key'; +import type { Timestamp } from './Timestamp'; +export type TokenInfo = { + admin_key?: Key; + auto_renew_account?: EntityId; + auto_renew_period?: number | null; + created_timestamp?: Timestamp; + decimals?: string; + deleted?: boolean | null; + expiry_timestamp?: number | null; + fee_schedule_key?: Key; + freeze_default?: boolean; + freeze_key?: Key; + initial_supply?: string; + kyc_key?: Key; + max_supply?: string; + /** + * Arbitrary binary data associated with this token class encoded in base64. + */ + metadata?: string; + metadata_key?: Key; + modified_timestamp?: Timestamp; + name?: string; + memo?: string; + pause_key?: Key; + pause_status?: TokenInfo.pause_status; + supply_key?: Key; + supply_type?: TokenInfo.supply_type; + symbol?: string; + token_id?: EntityId; + total_supply?: string; + treasury_account_id?: EntityId; + type?: TokenInfo.type; + wipe_key?: Key; + custom_fees?: CustomFees; +}; +export namespace TokenInfo { + export enum pause_status { + NOT_APPLICABLE = 'NOT_APPLICABLE', + PAUSED = 'PAUSED', + UNPAUSED = 'UNPAUSED', + } + export enum supply_type { + FINITE = 'FINITE', + INFINITE = 'INFINITE', + } + export enum type { + FUNGIBLE_COMMON = 'FUNGIBLE_COMMON', + NON_FUNGIBLE_UNIQUE = 'NON_FUNGIBLE_UNIQUE', + } +} + diff --git a/src/utils/models/mirror-node-models/TokenRelationship.ts b/src/utils/models/mirror-node-models/TokenRelationship.ts new file mode 100644 index 00000000..e1d76500 --- /dev/null +++ b/src/utils/models/mirror-node-models/TokenRelationship.ts @@ -0,0 +1,46 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { Timestamp } from './Timestamp'; +export type TokenRelationship = { + /** + * Specifies if the relationship is implicitly/explicitly associated. + */ + automatic_association: boolean; + /** + * For FUNGIBLE_COMMON, the balance that the account holds in the smallest denomination. For NON_FUNGIBLE_UNIQUE, the number of NFTs held by the account. + */ + balance: number; + created_timestamp: Timestamp; + decimals: number; + /** + * The Freeze status of the account. + */ + freeze_status: TokenRelationship.freeze_status; + /** + * The KYC status of the account. + */ + kyc_status: TokenRelationship.kyc_status; + token_id: EntityId; +}; +export namespace TokenRelationship { + /** + * The Freeze status of the account. + */ + export enum freeze_status { + NOT_APPLICABLE = 'NOT_APPLICABLE', + FROZEN = 'FROZEN', + UNFROZEN = 'UNFROZEN', + } + /** + * The KYC status of the account. + */ + export enum kyc_status { + NOT_APPLICABLE = 'NOT_APPLICABLE', + GRANTED = 'GRANTED', + REVOKED = 'REVOKED', + } +} + diff --git a/src/utils/models/mirror-node-models/TokenRelationshipResponse.ts b/src/utils/models/mirror-node-models/TokenRelationshipResponse.ts new file mode 100644 index 00000000..cdcce5d1 --- /dev/null +++ b/src/utils/models/mirror-node-models/TokenRelationshipResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Links } from './Links'; +import type { TokenRelationship } from './TokenRelationship'; +export type TokenRelationshipResponse = { + tokens?: Array; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/Tokens.ts b/src/utils/models/mirror-node-models/Tokens.ts new file mode 100644 index 00000000..7589caec --- /dev/null +++ b/src/utils/models/mirror-node-models/Tokens.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Token } from './Token'; +export type Tokens = Array; diff --git a/src/utils/models/mirror-node-models/TokensResponse.ts b/src/utils/models/mirror-node-models/TokensResponse.ts new file mode 100644 index 00000000..9ec0607b --- /dev/null +++ b/src/utils/models/mirror-node-models/TokensResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Links } from './Links'; +import type { Tokens } from './Tokens'; +export type TokensResponse = { + tokens?: Tokens; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/Topic.ts b/src/utils/models/mirror-node-models/Topic.ts new file mode 100644 index 00000000..e5dabfa2 --- /dev/null +++ b/src/utils/models/mirror-node-models/Topic.ts @@ -0,0 +1,29 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { Key } from './Key'; +import type { TimestampNullable } from './TimestampNullable'; +import type { TimestampRange } from './TimestampRange'; +export type Topic = { + admin_key: Key; + auto_renew_account: EntityId; + /** + * The amount of time to attempt to extend the topic's lifetime after expiration. + */ + auto_renew_period: number | null; + created_timestamp: TimestampNullable; + /** + * Whether the topic is deleted or not. + */ + deleted: boolean | null; + /** + * The memo associated with the topic. + */ + memo: string; + submit_key: Key; + timestamp: TimestampRange; + topic_id: EntityId; +}; + diff --git a/src/utils/models/mirror-node-models/TopicMessage.ts b/src/utils/models/mirror-node-models/TopicMessage.ts new file mode 100644 index 00000000..1dc5f0e5 --- /dev/null +++ b/src/utils/models/mirror-node-models/TopicMessage.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ChunkInfo } from './ChunkInfo'; +import type { EntityId } from './EntityId'; +import type { Timestamp } from './Timestamp'; +export type TopicMessage = { + chunk_info?: ChunkInfo; + consensus_timestamp: Timestamp; + message: string; + payer_account_id: EntityId; + running_hash: string; + running_hash_version: number; + sequence_number: number; + topic_id: EntityId; +}; + diff --git a/src/utils/models/mirror-node-models/TopicMessages.ts b/src/utils/models/mirror-node-models/TopicMessages.ts new file mode 100644 index 00000000..c0d3056b --- /dev/null +++ b/src/utils/models/mirror-node-models/TopicMessages.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { TopicMessage } from './TopicMessage'; +export type TopicMessages = Array; diff --git a/src/utils/models/mirror-node-models/TopicMessagesResponse.ts b/src/utils/models/mirror-node-models/TopicMessagesResponse.ts new file mode 100644 index 00000000..47f69094 --- /dev/null +++ b/src/utils/models/mirror-node-models/TopicMessagesResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Links } from './Links'; +import type { TopicMessages } from './TopicMessages'; +export type TopicMessagesResponse = { + messages?: TopicMessages; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/Transaction.ts b/src/utils/models/mirror-node-models/Transaction.ts new file mode 100644 index 00000000..be17e074 --- /dev/null +++ b/src/utils/models/mirror-node-models/Transaction.ts @@ -0,0 +1,47 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { StakingRewardTransfers } from './StakingRewardTransfers'; +import type { Timestamp } from './Timestamp'; +import type { TimestampNullable } from './TimestampNullable'; +import type { TransactionTypes } from './TransactionTypes'; +export type Transaction = { + bytes?: string | null; + charged_tx_fee?: number; + consensus_timestamp?: Timestamp; + entity_id?: EntityId; + max_fee?: string; + memo_base64?: string | null; + name?: TransactionTypes; + nft_transfers?: Array<{ + is_approval: boolean; + receiver_account_id: EntityId; + sender_account_id: EntityId; + serial_number: number; + token_id: EntityId; + }>; + node?: EntityId; + nonce?: number; + parent_consensus_timestamp?: TimestampNullable; + result?: string; + scheduled?: boolean; + staking_reward_transfers?: StakingRewardTransfers; + token_transfers?: Array<{ + token_id: EntityId; + account: EntityId; + amount: number; + is_approval?: boolean; + }>; + transaction_hash?: string; + transaction_id?: string; + transfers?: Array<{ + account: EntityId; + amount: number; + is_approval?: boolean; + }>; + valid_duration_seconds?: string; + valid_start_timestamp?: Timestamp; +}; + diff --git a/src/utils/models/mirror-node-models/TransactionByIdResponse.ts b/src/utils/models/mirror-node-models/TransactionByIdResponse.ts new file mode 100644 index 00000000..885d54d7 --- /dev/null +++ b/src/utils/models/mirror-node-models/TransactionByIdResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { TransactionDetails } from './TransactionDetails'; +export type TransactionByIdResponse = { + transactions?: TransactionDetails; +}; + diff --git a/src/utils/models/mirror-node-models/TransactionDetail.ts b/src/utils/models/mirror-node-models/TransactionDetail.ts new file mode 100644 index 00000000..bc10439a --- /dev/null +++ b/src/utils/models/mirror-node-models/TransactionDetail.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { AssessedCustomFee } from './AssessedCustomFee'; +import type { Transaction } from './Transaction'; +export type TransactionDetail = (Transaction & { + assessed_custom_fees?: Array; +}); + diff --git a/src/utils/models/mirror-node-models/TransactionDetails.ts b/src/utils/models/mirror-node-models/TransactionDetails.ts new file mode 100644 index 00000000..7f85e482 --- /dev/null +++ b/src/utils/models/mirror-node-models/TransactionDetails.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { TransactionDetail } from './TransactionDetail'; +export type TransactionDetails = Array; diff --git a/src/utils/models/mirror-node-models/TransactionId.ts b/src/utils/models/mirror-node-models/TransactionId.ts new file mode 100644 index 00000000..ddc3b928 --- /dev/null +++ b/src/utils/models/mirror-node-models/TransactionId.ts @@ -0,0 +1,13 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +import type { Timestamp } from './Timestamp'; +export type TransactionId = { + account_id?: EntityId; + nonce?: number | null; + scheduled?: boolean | null; + transaction_valid_start?: Timestamp; +}; + diff --git a/src/utils/models/mirror-node-models/TransactionIdStr.ts b/src/utils/models/mirror-node-models/TransactionIdStr.ts new file mode 100644 index 00000000..2715ba1c --- /dev/null +++ b/src/utils/models/mirror-node-models/TransactionIdStr.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * A transaction id in string format. + */ +export type TransactionIdStr = string; diff --git a/src/utils/models/mirror-node-models/TransactionTypes.ts b/src/utils/models/mirror-node-models/TransactionTypes.ts new file mode 100644 index 00000000..6e86fd96 --- /dev/null +++ b/src/utils/models/mirror-node-models/TransactionTypes.ts @@ -0,0 +1,61 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export enum TransactionTypes { + CONSENSUSCREATETOPIC = 'CONSENSUSCREATETOPIC', + CONSENSUSDELETETOPIC = 'CONSENSUSDELETETOPIC', + CONSENSUSSUBMITMESSAGE = 'CONSENSUSSUBMITMESSAGE', + CONSENSUSUPDATETOPIC = 'CONSENSUSUPDATETOPIC', + CONTRACTCALL = 'CONTRACTCALL', + CONTRACTCREATEINSTANCE = 'CONTRACTCREATEINSTANCE', + CONTRACTDELETEINSTANCE = 'CONTRACTDELETEINSTANCE', + CONTRACTUPDATEINSTANCE = 'CONTRACTUPDATEINSTANCE', + CRYPTOADDLIVEHASH = 'CRYPTOADDLIVEHASH', + CRYPTOAPPROVEALLOWANCE = 'CRYPTOAPPROVEALLOWANCE', + CRYPTOCREATEACCOUNT = 'CRYPTOCREATEACCOUNT', + CRYPTODELETE = 'CRYPTODELETE', + CRYPTODELETEALLOWANCE = 'CRYPTODELETEALLOWANCE', + CRYPTODELETELIVEHASH = 'CRYPTODELETELIVEHASH', + CRYPTOTRANSFER = 'CRYPTOTRANSFER', + CRYPTOUPDATEACCOUNT = 'CRYPTOUPDATEACCOUNT', + ETHEREUMTRANSACTION = 'ETHEREUMTRANSACTION', + FILEAPPEND = 'FILEAPPEND', + FILECREATE = 'FILECREATE', + FILEDELETE = 'FILEDELETE', + FILEUPDATE = 'FILEUPDATE', + FREEZE = 'FREEZE', + NODE = 'NODE', + NODECREATE = 'NODECREATE', + NODEDELETE = 'NODEDELETE', + NODESTAKEUPDATE = 'NODESTAKEUPDATE', + NODEUPDATE = 'NODEUPDATE', + SCHEDULECREATE = 'SCHEDULECREATE', + SCHEDULEDELETE = 'SCHEDULEDELETE', + SCHEDULESIGN = 'SCHEDULESIGN', + SYSTEMDELETE = 'SYSTEMDELETE', + SYSTEMUNDELETE = 'SYSTEMUNDELETE', + TOKENAIRDROP = 'TOKENAIRDROP', + TOKENASSOCIATE = 'TOKENASSOCIATE', + TOKENBURN = 'TOKENBURN', + TOKENCANCELAIRDROP = 'TOKENCANCELAIRDROP', + TOKENCLAIMAIRDROP = 'TOKENCLAIMAIRDROP', + TOKENCREATION = 'TOKENCREATION', + TOKENDELETION = 'TOKENDELETION', + TOKENDISSOCIATE = 'TOKENDISSOCIATE', + TOKENFEESCHEDULEUPDATE = 'TOKENFEESCHEDULEUPDATE', + TOKENFREEZE = 'TOKENFREEZE', + TOKENGRANTKYC = 'TOKENGRANTKYC', + TOKENMINT = 'TOKENMINT', + TOKENPAUSE = 'TOKENPAUSE', + TOKENREJECT = 'TOKENREJECT', + TOKENREVOKEKYC = 'TOKENREVOKEKYC', + TOKENUNFREEZE = 'TOKENUNFREEZE', + TOKENUNPAUSE = 'TOKENUNPAUSE', + TOKENUPDATE = 'TOKENUPDATE', + TOKENUPDATENFTS = 'TOKENUPDATENFTS', + TOKENWIPE = 'TOKENWIPE', + UNCHECKEDSUBMIT = 'UNCHECKEDSUBMIT', + UNKNOWN = 'UNKNOWN', + UTILPRNG = 'UTILPRNG', +} diff --git a/src/utils/models/mirror-node-models/Transactions.ts b/src/utils/models/mirror-node-models/Transactions.ts new file mode 100644 index 00000000..eeb49456 --- /dev/null +++ b/src/utils/models/mirror-node-models/Transactions.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Transaction } from './Transaction'; +export type Transactions = Array; diff --git a/src/utils/models/mirror-node-models/TransactionsResponse.ts b/src/utils/models/mirror-node-models/TransactionsResponse.ts new file mode 100644 index 00000000..c2d8d084 --- /dev/null +++ b/src/utils/models/mirror-node-models/TransactionsResponse.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Links } from './Links'; +import type { Transactions } from './Transactions'; +export type TransactionsResponse = { + transactions?: Transactions; + links?: Links; +}; + diff --git a/src/utils/models/mirror-node-models/accountBalanceQueryParam.ts b/src/utils/models/mirror-node-models/accountBalanceQueryParam.ts new file mode 100644 index 00000000..cd6b869f --- /dev/null +++ b/src/utils/models/mirror-node-models/accountBalanceQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The optional balance value to compare against + */ +export type accountBalanceQueryParam = string; diff --git a/src/utils/models/mirror-node-models/accountIdOrAliasOrEvmAddressPathParam.ts b/src/utils/models/mirror-node-models/accountIdOrAliasOrEvmAddressPathParam.ts new file mode 100644 index 00000000..5fabb946 --- /dev/null +++ b/src/utils/models/mirror-node-models/accountIdOrAliasOrEvmAddressPathParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Account alias or account id or evm address + */ +export type accountIdOrAliasOrEvmAddressPathParam = string; diff --git a/src/utils/models/mirror-node-models/accountIdOrAliasOrEvmAddressQueryParam.ts b/src/utils/models/mirror-node-models/accountIdOrAliasOrEvmAddressQueryParam.ts new file mode 100644 index 00000000..37e407e5 --- /dev/null +++ b/src/utils/models/mirror-node-models/accountIdOrAliasOrEvmAddressQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Account id or account alias with no shard realm or evm address with no shard realm + */ +export type accountIdOrAliasOrEvmAddressQueryParam = string; diff --git a/src/utils/models/mirror-node-models/accountIdQueryParam.ts b/src/utils/models/mirror-node-models/accountIdQueryParam.ts new file mode 100644 index 00000000..cedf6e9d --- /dev/null +++ b/src/utils/models/mirror-node-models/accountIdQueryParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityIdQuery } from './EntityIdQuery'; +/** + * The ID of the account to return information for + */ +export type accountIdQueryParam = EntityIdQuery; diff --git a/src/utils/models/mirror-node-models/accountPublicKeyQueryParam.ts b/src/utils/models/mirror-node-models/accountPublicKeyQueryParam.ts new file mode 100644 index 00000000..c27dfc1b --- /dev/null +++ b/src/utils/models/mirror-node-models/accountPublicKeyQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The account's public key to compare against + */ +export type accountPublicKeyQueryParam = string; diff --git a/src/utils/models/mirror-node-models/balanceQueryParam.ts b/src/utils/models/mirror-node-models/balanceQueryParam.ts new file mode 100644 index 00000000..81ad9337 --- /dev/null +++ b/src/utils/models/mirror-node-models/balanceQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Whether to include balance information or not. If included, token balances are limited to at most 50 per account as outlined in HIP-367. If multiple values are provided the last value will be the only value used. + */ +export type balanceQueryParam = boolean; diff --git a/src/utils/models/mirror-node-models/blockHashQueryParam.ts b/src/utils/models/mirror-node-models/blockHashQueryParam.ts new file mode 100644 index 00000000..c2b77173 --- /dev/null +++ b/src/utils/models/mirror-node-models/blockHashQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The block's hash. If multiple values are provided the last value will be the only value used. + */ +export type blockHashQueryParam = string; diff --git a/src/utils/models/mirror-node-models/blockNumberQueryParam.ts b/src/utils/models/mirror-node-models/blockNumberQueryParam.ts new file mode 100644 index 00000000..e5f1dc45 --- /dev/null +++ b/src/utils/models/mirror-node-models/blockNumberQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The block's number + */ +export type blockNumberQueryParam = string; diff --git a/src/utils/models/mirror-node-models/contractActionsIndexQueryParam.ts b/src/utils/models/mirror-node-models/contractActionsIndexQueryParam.ts new file mode 100644 index 00000000..ec953378 --- /dev/null +++ b/src/utils/models/mirror-node-models/contractActionsIndexQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The index of a contract action + */ +export type contractActionsIndexQueryParam = string; diff --git a/src/utils/models/mirror-node-models/contractIdOrAddressPathParam.ts b/src/utils/models/mirror-node-models/contractIdOrAddressPathParam.ts new file mode 100644 index 00000000..cc16257c --- /dev/null +++ b/src/utils/models/mirror-node-models/contractIdOrAddressPathParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The ID or hex encoded EVM address (with or without 0x prefix) associated with this contract. + */ +export type contractIdOrAddressPathParam = string; diff --git a/src/utils/models/mirror-node-models/contractIdQueryParam.ts b/src/utils/models/mirror-node-models/contractIdQueryParam.ts new file mode 100644 index 00000000..79028f82 --- /dev/null +++ b/src/utils/models/mirror-node-models/contractIdQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The ID of the smart contract + */ +export type contractIdQueryParam = string; diff --git a/src/utils/models/mirror-node-models/contractsBlockNumberQueryParam.ts b/src/utils/models/mirror-node-models/contractsBlockNumberQueryParam.ts new file mode 100644 index 00000000..29ca5fc4 --- /dev/null +++ b/src/utils/models/mirror-node-models/contractsBlockNumberQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The block's number + */ +export type contractsBlockNumberQueryParam = string; diff --git a/src/utils/models/mirror-node-models/entityIdPathParam.ts b/src/utils/models/mirror-node-models/entityIdPathParam.ts new file mode 100644 index 00000000..6926cae1 --- /dev/null +++ b/src/utils/models/mirror-node-models/entityIdPathParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +/** + * Entity id + */ +export type entityIdPathParam = EntityId; diff --git a/src/utils/models/mirror-node-models/fileIdQueryParam.ts b/src/utils/models/mirror-node-models/fileIdQueryParam.ts new file mode 100644 index 00000000..97612fc7 --- /dev/null +++ b/src/utils/models/mirror-node-models/fileIdQueryParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityIdQuery } from './EntityIdQuery'; +/** + * The ID of the file entity + */ +export type fileIdQueryParam = EntityIdQuery; diff --git a/src/utils/models/mirror-node-models/fromQueryParam.ts b/src/utils/models/mirror-node-models/fromQueryParam.ts new file mode 100644 index 00000000..e1b59498 --- /dev/null +++ b/src/utils/models/mirror-node-models/fromQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Account ID or EVM address executing the contract + */ +export type fromQueryParam = string; diff --git a/src/utils/models/mirror-node-models/hashOrNumberPathParam.ts b/src/utils/models/mirror-node-models/hashOrNumberPathParam.ts new file mode 100644 index 00000000..c572994b --- /dev/null +++ b/src/utils/models/mirror-node-models/hashOrNumberPathParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Accepts both eth and hedera hash format or block number + */ +export type hashOrNumberPathParam = string; diff --git a/src/utils/models/mirror-node-models/index.ts b/src/utils/models/mirror-node-models/index.ts new file mode 100644 index 00000000..59643d99 --- /dev/null +++ b/src/utils/models/mirror-node-models/index.ts @@ -0,0 +1,183 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type { AccountAlias } from './AccountAlias'; +export type { AccountBalance } from './AccountBalance'; +export type { accountBalanceQueryParam } from './accountBalanceQueryParam'; +export type { AccountBalanceTransactions } from './AccountBalanceTransactions'; +export type { accountIdOrAliasOrEvmAddressPathParam } from './accountIdOrAliasOrEvmAddressPathParam'; +export type { accountIdOrAliasOrEvmAddressQueryParam } from './accountIdOrAliasOrEvmAddressQueryParam'; +export type { accountIdQueryParam } from './accountIdQueryParam'; +export type { AccountInfo } from './AccountInfo'; +export type { accountPublicKeyQueryParam } from './accountPublicKeyQueryParam'; +export type { Accounts } from './Accounts'; +export type { AccountsResponse } from './AccountsResponse'; +export type { Alias } from './Alias'; +export type { Allowance } from './Allowance'; +export type { AssessedCustomFee } from './AssessedCustomFee'; +export type { Balance } from './Balance'; +export type { balanceQueryParam } from './balanceQueryParam'; +export type { BalancesResponse } from './BalancesResponse'; +export type { Block } from './Block'; +export type { blockHashQueryParam } from './blockHashQueryParam'; +export type { blockNumberQueryParam } from './blockNumberQueryParam'; +export type { Blocks } from './Blocks'; +export type { BlocksResponse } from './BlocksResponse'; +export type { Bloom } from './Bloom'; +export type { ChunkInfo } from './ChunkInfo'; +export type { Contract } from './Contract'; +export { ContractAction } from './ContractAction'; +export type { ContractActions } from './ContractActions'; +export type { contractActionsIndexQueryParam } from './contractActionsIndexQueryParam'; +export type { ContractActionsResponse } from './ContractActionsResponse'; +export type { ContractCallRequest } from './ContractCallRequest'; +export type { ContractCallResponse } from './ContractCallResponse'; +export type { contractIdOrAddressPathParam } from './contractIdOrAddressPathParam'; +export type { contractIdQueryParam } from './contractIdQueryParam'; +export type { ContractLog } from './ContractLog'; +export type { ContractLogs } from './ContractLogs'; +export type { ContractLogsResponse } from './ContractLogsResponse'; +export type { ContractLogTopics } from './ContractLogTopics'; +export type { ContractResponse } from './ContractResponse'; +export type { ContractResult } from './ContractResult'; +export type { ContractResultDetails } from './ContractResultDetails'; +export type { ContractResultLog } from './ContractResultLog'; +export type { ContractResultLogs } from './ContractResultLogs'; +export type { ContractResults } from './ContractResults'; +export type { ContractResultsResponse } from './ContractResultsResponse'; +export type { ContractResultStateChange } from './ContractResultStateChange'; +export type { ContractResultStateChanges } from './ContractResultStateChanges'; +export type { Contracts } from './Contracts'; +export type { contractsBlockNumberQueryParam } from './contractsBlockNumberQueryParam'; +export type { ContractsResponse } from './ContractsResponse'; +export type { ContractState } from './ContractState'; +export type { ContractStateResponse } from './ContractStateResponse'; +export type { CryptoAllowance } from './CryptoAllowance'; +export type { CryptoAllowances } from './CryptoAllowances'; +export type { CryptoAllowancesResponse } from './CryptoAllowancesResponse'; +export type { CustomFees } from './CustomFees'; +export type { EntityId } from './EntityId'; +export type { entityIdPathParam } from './entityIdPathParam'; +export type { EntityIdQuery } from './EntityIdQuery'; +export type { Error } from './Error'; +export type { EthereumHash } from './EthereumHash'; +export type { EvmAddress } from './EvmAddress'; +export type { EvmAddressNullable } from './EvmAddressNullable'; +export type { EvmAddressWithShardRealm } from './EvmAddressWithShardRealm'; +export type { ExchangeRate } from './ExchangeRate'; +export type { fileIdQueryParam } from './fileIdQueryParam'; +export type { FixedFee } from './FixedFee'; +export type { FractionalFee } from './FractionalFee'; +export type { fromQueryParam } from './fromQueryParam'; +export type { hashOrNumberPathParam } from './hashOrNumberPathParam'; +export type { HederaHash } from './HederaHash'; +export type { internalQueryParam } from './internalQueryParam'; +export { Key } from './Key'; +export type { limitQueryParam } from './limitQueryParam'; +export type { Links } from './Links'; +export type { logIndexQueryParam } from './logIndexQueryParam'; +export type { logTopic0QueryParam } from './logTopic0QueryParam'; +export type { logTopic1QueryParam } from './logTopic1QueryParam'; +export type { logTopic2QueryParam } from './logTopic2QueryParam'; +export type { logTopic3QueryParam } from './logTopic3QueryParam'; +export type { LogTopicQueryParam } from './LogTopicQueryParam'; +export type { memory } from './memory'; +export type { NetworkExchangeRateSetResponse } from './NetworkExchangeRateSetResponse'; +export type { NetworkFee } from './NetworkFee'; +export type { NetworkFees } from './NetworkFees'; +export type { NetworkFeesResponse } from './NetworkFeesResponse'; +export type { NetworkNode } from './NetworkNode'; +export type { NetworkNodes } from './NetworkNodes'; +export type { NetworkNodesResponse } from './NetworkNodesResponse'; +export type { NetworkStakeResponse } from './NetworkStakeResponse'; +export type { NetworkSupplyResponse } from './NetworkSupplyResponse'; +export type { Nft } from './Nft'; +export type { NftAllowance } from './NftAllowance'; +export type { NftAllowances } from './NftAllowances'; +export type { NftAllowancesResponse } from './NftAllowancesResponse'; +export type { Nfts } from './Nfts'; +export type { NftTransactionHistory } from './NftTransactionHistory'; +export type { NftTransactionTransfer } from './NftTransactionTransfer'; +export type { nodeIdQueryParam } from './nodeIdQueryParam'; +export type { nonceQueryParam } from './nonceQueryParam'; +export type { nonceQueryParamWithDefault } from './nonceQueryParamWithDefault'; +export type { Opcode } from './Opcode'; +export type { OpcodesResponse } from './OpcodesResponse'; +export { orderQueryParam } from './orderQueryParam'; +export { orderQueryParamDesc } from './orderQueryParamDesc'; +export type { ownerQueryParam } from './ownerQueryParam'; +export type { PositiveNumber } from './PositiveNumber'; +export type { publicKeyQueryParam } from './publicKeyQueryParam'; +export type { receiverIdQueryParam } from './receiverIdQueryParam'; +export type { RoyaltyFee } from './RoyaltyFee'; +export type { Schedule } from './Schedule'; +export type { scheduledQueryParam } from './scheduledQueryParam'; +export type { scheduledQueryParamWithDefault } from './scheduledQueryParamWithDefault'; +export type { scheduleIdPathParam } from './scheduleIdPathParam'; +export type { scheduleIdQueryParam } from './scheduleIdQueryParam'; +export type { Schedules } from './Schedules'; +export { ScheduleSignature } from './ScheduleSignature'; +export type { SchedulesResponse } from './SchedulesResponse'; +export type { senderIdQueryParam } from './senderIdQueryParam'; +export type { serialNumberPathParam } from './serialNumberPathParam'; +export type { serialNumberQueryParam } from './serialNumberQueryParam'; +export type { ServiceEndpoint } from './ServiceEndpoint'; +export type { ServiceEndpoints } from './ServiceEndpoints'; +export type { slotQueryParam } from './slotQueryParam'; +export type { spenderIdQueryParam } from './spenderIdQueryParam'; +export type { stack } from './stack'; +export type { StakingReward } from './StakingReward'; +export type { StakingRewardsResponse } from './StakingRewardsResponse'; +export type { StakingRewardTransfer } from './StakingRewardTransfer'; +export type { StakingRewardTransfers } from './StakingRewardTransfers'; +export type { stateTimestampQueryParam } from './stateTimestampQueryParam'; +export type { storage } from './storage'; +export type { Timestamp } from './Timestamp'; +export type { TimestampNullable } from './TimestampNullable'; +export type { timestampPathParam } from './timestampPathParam'; +export type { timestampQueryParam } from './timestampQueryParam'; +export type { TimestampRange } from './TimestampRange'; +export type { TimestampRangeNullable } from './TimestampRangeNullable'; +export type { Token } from './Token'; +export type { TokenAirdrop } from './TokenAirdrop'; +export type { TokenAirdrops } from './TokenAirdrops'; +export type { TokenAirdropsResponse } from './TokenAirdropsResponse'; +export type { TokenAllowance } from './TokenAllowance'; +export type { TokenAllowances } from './TokenAllowances'; +export type { TokenAllowancesResponse } from './TokenAllowancesResponse'; +export type { TokenBalance } from './TokenBalance'; +export type { TokenBalancesResponse } from './TokenBalancesResponse'; +export type { TokenDistribution } from './TokenDistribution'; +export type { tokenIdPathParam } from './tokenIdPathParam'; +export type { tokenIdQueryParam } from './tokenIdQueryParam'; +export { TokenInfo } from './TokenInfo'; +export type { tokenInfoTimestampQueryParam } from './tokenInfoTimestampQueryParam'; +export type { tokenNameQueryParam } from './tokenNameQueryParam'; +export { TokenRelationship } from './TokenRelationship'; +export type { TokenRelationshipResponse } from './TokenRelationshipResponse'; +export type { Tokens } from './Tokens'; +export type { TokensResponse } from './TokensResponse'; +export type { tokenTypeQueryParam } from './tokenTypeQueryParam'; +export type { Topic } from './Topic'; +export type { topicIdPathParam } from './topicIdPathParam'; +export type { TopicMessage } from './TopicMessage'; +export type { TopicMessages } from './TopicMessages'; +export type { TopicMessagesResponse } from './TopicMessagesResponse'; +export type { Transaction } from './Transaction'; +export type { TransactionByIdResponse } from './TransactionByIdResponse'; +export type { TransactionDetail } from './TransactionDetail'; +export type { TransactionDetails } from './TransactionDetails'; +export type { transactionHashQueryParam } from './transactionHashQueryParam'; +export type { TransactionId } from './TransactionId'; +export type { transactionIdOrEthHashPathParam } from './transactionIdOrEthHashPathParam'; +export type { transactionIdPathParam } from './transactionIdPathParam'; +export type { TransactionIdStr } from './TransactionIdStr'; +export type { transactionIndexQueryParam } from './transactionIndexQueryParam'; +export type { Transactions } from './Transactions'; +export type { transactionsQueryParam } from './transactionsQueryParam'; +export type { TransactionsResponse } from './TransactionsResponse'; +export type { transactionTypeQueryParam } from './transactionTypeQueryParam'; +export { TransactionTypes } from './TransactionTypes'; + diff --git a/src/utils/models/mirror-node-models/internalQueryParam.ts b/src/utils/models/mirror-node-models/internalQueryParam.ts new file mode 100644 index 00000000..2ea8be7a --- /dev/null +++ b/src/utils/models/mirror-node-models/internalQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Whether to include child transactions or not + */ +export type internalQueryParam = boolean; diff --git a/src/utils/models/mirror-node-models/limitQueryParam.ts b/src/utils/models/mirror-node-models/limitQueryParam.ts new file mode 100644 index 00000000..86dc50e4 --- /dev/null +++ b/src/utils/models/mirror-node-models/limitQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The maximum number of items to return + */ +export type limitQueryParam = number; diff --git a/src/utils/models/mirror-node-models/logIndexQueryParam.ts b/src/utils/models/mirror-node-models/logIndexQueryParam.ts new file mode 100644 index 00000000..38dbccce --- /dev/null +++ b/src/utils/models/mirror-node-models/logIndexQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Contract log index + */ +export type logIndexQueryParam = string; diff --git a/src/utils/models/mirror-node-models/logTopic0QueryParam.ts b/src/utils/models/mirror-node-models/logTopic0QueryParam.ts new file mode 100644 index 00000000..19c21e52 --- /dev/null +++ b/src/utils/models/mirror-node-models/logTopic0QueryParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { LogTopicQueryParam } from './LogTopicQueryParam'; +/** + * The first topic associated with a contract log. Requires a timestamp range also be populated. + */ +export type logTopic0QueryParam = LogTopicQueryParam; diff --git a/src/utils/models/mirror-node-models/logTopic1QueryParam.ts b/src/utils/models/mirror-node-models/logTopic1QueryParam.ts new file mode 100644 index 00000000..509c8d2b --- /dev/null +++ b/src/utils/models/mirror-node-models/logTopic1QueryParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { LogTopicQueryParam } from './LogTopicQueryParam'; +/** + * The second topic associated with a contract log. Requires a timestamp range also be populated. + */ +export type logTopic1QueryParam = LogTopicQueryParam; diff --git a/src/utils/models/mirror-node-models/logTopic2QueryParam.ts b/src/utils/models/mirror-node-models/logTopic2QueryParam.ts new file mode 100644 index 00000000..29478a71 --- /dev/null +++ b/src/utils/models/mirror-node-models/logTopic2QueryParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { LogTopicQueryParam } from './LogTopicQueryParam'; +/** + * The third topic associated with a contract log. Requires a timestamp range also be populated. + */ +export type logTopic2QueryParam = LogTopicQueryParam; diff --git a/src/utils/models/mirror-node-models/logTopic3QueryParam.ts b/src/utils/models/mirror-node-models/logTopic3QueryParam.ts new file mode 100644 index 00000000..62ba4e9e --- /dev/null +++ b/src/utils/models/mirror-node-models/logTopic3QueryParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { LogTopicQueryParam } from './LogTopicQueryParam'; +/** + * The fourth topic associated with a contract log. Requires a timestamp range also be populated. + */ +export type logTopic3QueryParam = LogTopicQueryParam; diff --git a/src/utils/models/mirror-node-models/memory.ts b/src/utils/models/mirror-node-models/memory.ts new file mode 100644 index 00000000..55d88c9a --- /dev/null +++ b/src/utils/models/mirror-node-models/memory.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * If provided and set to true, memory information will be included in the response + */ +export type memory = boolean; diff --git a/src/utils/models/mirror-node-models/nodeIdQueryParam.ts b/src/utils/models/mirror-node-models/nodeIdQueryParam.ts new file mode 100644 index 00000000..3961be49 --- /dev/null +++ b/src/utils/models/mirror-node-models/nodeIdQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The ID of the node + */ +export type nodeIdQueryParam = string; diff --git a/src/utils/models/mirror-node-models/nonceQueryParam.ts b/src/utils/models/mirror-node-models/nonceQueryParam.ts new file mode 100644 index 00000000..33892549 --- /dev/null +++ b/src/utils/models/mirror-node-models/nonceQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Filter the query result by the nonce of the transaction. A zero nonce represents user submitted transactions while a non-zero nonce is generated by main nodes. The filter honors the last value. If not specified, all transactions with specified payer account ID and valid start timestamp match. If multiple values are provided the last value will be the only value used. + */ +export type nonceQueryParam = number; diff --git a/src/utils/models/mirror-node-models/nonceQueryParamWithDefault.ts b/src/utils/models/mirror-node-models/nonceQueryParamWithDefault.ts new file mode 100644 index 00000000..3699ad1a --- /dev/null +++ b/src/utils/models/mirror-node-models/nonceQueryParamWithDefault.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Filter the query result by the nonce of the transaction. A zero nonce represents user submitted transactions while a non-zero nonce is generated by main nodes. The filter honors the last value. Default is 0 when not specified. + */ +export type nonceQueryParamWithDefault = number; diff --git a/src/utils/models/mirror-node-models/orderQueryParam.ts b/src/utils/models/mirror-node-models/orderQueryParam.ts new file mode 100644 index 00000000..6dc927a1 --- /dev/null +++ b/src/utils/models/mirror-node-models/orderQueryParam.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The order in which items are listed + */ +export enum orderQueryParam { + ASC = 'asc', + DESC = 'desc', +} diff --git a/src/utils/models/mirror-node-models/orderQueryParamDesc.ts b/src/utils/models/mirror-node-models/orderQueryParamDesc.ts new file mode 100644 index 00000000..b6299704 --- /dev/null +++ b/src/utils/models/mirror-node-models/orderQueryParamDesc.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The order in which items are listed + */ +export enum orderQueryParamDesc { + ASC = 'asc', + DESC = 'desc', +} diff --git a/src/utils/models/mirror-node-models/ownerQueryParam.ts b/src/utils/models/mirror-node-models/ownerQueryParam.ts new file mode 100644 index 00000000..ea4acd6f --- /dev/null +++ b/src/utils/models/mirror-node-models/ownerQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * When the owner value is true or omitted, the accountId path parameter will specify the ID of the owner, and the API will retrieve the allowances that the owner has granted to different spenders. Conversely, when the owner value is false, the accountId path parameter will indicate the ID of the spender who has an allowance, and the API will instead provide the allowances granted to the spender by different owners of those tokens. + */ +export type ownerQueryParam = boolean; diff --git a/src/utils/models/mirror-node-models/publicKeyQueryParam.ts b/src/utils/models/mirror-node-models/publicKeyQueryParam.ts new file mode 100644 index 00000000..b0bd52f4 --- /dev/null +++ b/src/utils/models/mirror-node-models/publicKeyQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The public key to compare against + */ +export type publicKeyQueryParam = string; diff --git a/src/utils/models/mirror-node-models/receiverIdQueryParam.ts b/src/utils/models/mirror-node-models/receiverIdQueryParam.ts new file mode 100644 index 00000000..3fd54dd1 --- /dev/null +++ b/src/utils/models/mirror-node-models/receiverIdQueryParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityIdQuery } from './EntityIdQuery'; +/** + * The ID of the receiver to return information for + */ +export type receiverIdQueryParam = EntityIdQuery; diff --git a/src/utils/models/mirror-node-models/scheduleIdPathParam.ts b/src/utils/models/mirror-node-models/scheduleIdPathParam.ts new file mode 100644 index 00000000..87a01c45 --- /dev/null +++ b/src/utils/models/mirror-node-models/scheduleIdPathParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +/** + * Schedule id + */ +export type scheduleIdPathParam = EntityId; diff --git a/src/utils/models/mirror-node-models/scheduleIdQueryParam.ts b/src/utils/models/mirror-node-models/scheduleIdQueryParam.ts new file mode 100644 index 00000000..14ea3a7c --- /dev/null +++ b/src/utils/models/mirror-node-models/scheduleIdQueryParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityIdQuery } from './EntityIdQuery'; +/** + * The ID of the schedule to return information for + */ +export type scheduleIdQueryParam = EntityIdQuery; diff --git a/src/utils/models/mirror-node-models/scheduledQueryParam.ts b/src/utils/models/mirror-node-models/scheduledQueryParam.ts new file mode 100644 index 00000000..9a3ad8e8 --- /dev/null +++ b/src/utils/models/mirror-node-models/scheduledQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Filter transactions by the scheduled flag. If true, return information for the scheduled transaction. If false, return information for the non-scheduled transaction. If not present, return information for all transactions matching transactionId. If multiple values are provided the last value will be the only value used. + */ +export type scheduledQueryParam = boolean; diff --git a/src/utils/models/mirror-node-models/scheduledQueryParamWithDefault.ts b/src/utils/models/mirror-node-models/scheduledQueryParamWithDefault.ts new file mode 100644 index 00000000..6a5915c4 --- /dev/null +++ b/src/utils/models/mirror-node-models/scheduledQueryParamWithDefault.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Filter transactions by the scheduled flag. If true, return information for the scheduled transaction. If false, return information for the non-scheduled transaction. + */ +export type scheduledQueryParamWithDefault = boolean; diff --git a/src/utils/models/mirror-node-models/senderIdQueryParam.ts b/src/utils/models/mirror-node-models/senderIdQueryParam.ts new file mode 100644 index 00000000..bfbb9d36 --- /dev/null +++ b/src/utils/models/mirror-node-models/senderIdQueryParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityIdQuery } from './EntityIdQuery'; +/** + * The ID of the sender to return information for + */ +export type senderIdQueryParam = EntityIdQuery; diff --git a/src/utils/models/mirror-node-models/serialNumberPathParam.ts b/src/utils/models/mirror-node-models/serialNumberPathParam.ts new file mode 100644 index 00000000..52d3a25d --- /dev/null +++ b/src/utils/models/mirror-node-models/serialNumberPathParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The nft serial number + */ +export type serialNumberPathParam = number; diff --git a/src/utils/models/mirror-node-models/serialNumberQueryParam.ts b/src/utils/models/mirror-node-models/serialNumberQueryParam.ts new file mode 100644 index 00000000..c2163010 --- /dev/null +++ b/src/utils/models/mirror-node-models/serialNumberQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The nft serial number (64 bit type). Requires a tokenId value also be populated. + */ +export type serialNumberQueryParam = string; diff --git a/src/utils/models/mirror-node-models/slotQueryParam.ts b/src/utils/models/mirror-node-models/slotQueryParam.ts new file mode 100644 index 00000000..0d860e8f --- /dev/null +++ b/src/utils/models/mirror-node-models/slotQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The slot's number + */ +export type slotQueryParam = string; diff --git a/src/utils/models/mirror-node-models/spenderIdQueryParam.ts b/src/utils/models/mirror-node-models/spenderIdQueryParam.ts new file mode 100644 index 00000000..34787e34 --- /dev/null +++ b/src/utils/models/mirror-node-models/spenderIdQueryParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityIdQuery } from './EntityIdQuery'; +/** + * The ID of the spender to return information for + */ +export type spenderIdQueryParam = EntityIdQuery; diff --git a/src/utils/models/mirror-node-models/stack.ts b/src/utils/models/mirror-node-models/stack.ts new file mode 100644 index 00000000..8c2b7cf0 --- /dev/null +++ b/src/utils/models/mirror-node-models/stack.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * If provided and set to false, stack information will not be included in the response + */ +export type stack = boolean; diff --git a/src/utils/models/mirror-node-models/stateTimestampQueryParam.ts b/src/utils/models/mirror-node-models/stateTimestampQueryParam.ts new file mode 100644 index 00000000..ce67cceb --- /dev/null +++ b/src/utils/models/mirror-node-models/stateTimestampQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The consensus timestamp of the contract state as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time. + */ +export type stateTimestampQueryParam = Array; diff --git a/src/utils/models/mirror-node-models/storage.ts b/src/utils/models/mirror-node-models/storage.ts new file mode 100644 index 00000000..1b505ca2 --- /dev/null +++ b/src/utils/models/mirror-node-models/storage.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * If provided and set to true, storage information will be included in the response + */ +export type storage = boolean; diff --git a/src/utils/models/mirror-node-models/timestampPathParam.ts b/src/utils/models/mirror-node-models/timestampPathParam.ts new file mode 100644 index 00000000..42af811a --- /dev/null +++ b/src/utils/models/mirror-node-models/timestampPathParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The Unix timestamp in seconds.nanoseconds format, the timestamp at which the associated transaction reached consensus. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time. + */ +export type timestampPathParam = string; diff --git a/src/utils/models/mirror-node-models/timestampQueryParam.ts b/src/utils/models/mirror-node-models/timestampQueryParam.ts new file mode 100644 index 00000000..fd1da50e --- /dev/null +++ b/src/utils/models/mirror-node-models/timestampQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The consensus timestamp as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time. + */ +export type timestampQueryParam = Array; diff --git a/src/utils/models/mirror-node-models/tokenIdPathParam.ts b/src/utils/models/mirror-node-models/tokenIdPathParam.ts new file mode 100644 index 00000000..03959209 --- /dev/null +++ b/src/utils/models/mirror-node-models/tokenIdPathParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +/** + * Token id + */ +export type tokenIdPathParam = EntityId; diff --git a/src/utils/models/mirror-node-models/tokenIdQueryParam.ts b/src/utils/models/mirror-node-models/tokenIdQueryParam.ts new file mode 100644 index 00000000..dc239d95 --- /dev/null +++ b/src/utils/models/mirror-node-models/tokenIdQueryParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityIdQuery } from './EntityIdQuery'; +/** + * The ID of the token to return information for + */ +export type tokenIdQueryParam = EntityIdQuery; diff --git a/src/utils/models/mirror-node-models/tokenInfoTimestampQueryParam.ts b/src/utils/models/mirror-node-models/tokenInfoTimestampQueryParam.ts new file mode 100644 index 00000000..3e0b1f50 --- /dev/null +++ b/src/utils/models/mirror-node-models/tokenInfoTimestampQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The Unix timestamp in seconds.nanoseconds format. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time. + */ +export type tokenInfoTimestampQueryParam = string; diff --git a/src/utils/models/mirror-node-models/tokenNameQueryParam.ts b/src/utils/models/mirror-node-models/tokenNameQueryParam.ts new file mode 100644 index 00000000..b5c6541d --- /dev/null +++ b/src/utils/models/mirror-node-models/tokenNameQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Partial or full token name. Not allowed to be used with token.id or account.id parameter. Pagination is not supported with the use of this parameter and results are ordered by token.id with respect to the order parameter. + */ +export type tokenNameQueryParam = string; diff --git a/src/utils/models/mirror-node-models/tokenTypeQueryParam.ts b/src/utils/models/mirror-node-models/tokenTypeQueryParam.ts new file mode 100644 index 00000000..bc4a58df --- /dev/null +++ b/src/utils/models/mirror-node-models/tokenTypeQueryParam.ts @@ -0,0 +1,5 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type tokenTypeQueryParam = Array; diff --git a/src/utils/models/mirror-node-models/topicIdPathParam.ts b/src/utils/models/mirror-node-models/topicIdPathParam.ts new file mode 100644 index 00000000..3626052b --- /dev/null +++ b/src/utils/models/mirror-node-models/topicIdPathParam.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { EntityId } from './EntityId'; +/** + * Topic id + */ +export type topicIdPathParam = EntityId; diff --git a/src/utils/models/mirror-node-models/transactionHashQueryParam.ts b/src/utils/models/mirror-node-models/transactionHashQueryParam.ts new file mode 100644 index 00000000..926518e1 --- /dev/null +++ b/src/utils/models/mirror-node-models/transactionHashQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * A hex encoded 32-byte ethereum transaction hash or 48-byte hedera transaction hash. + */ +export type transactionHashQueryParam = string; diff --git a/src/utils/models/mirror-node-models/transactionIdOrEthHashPathParam.ts b/src/utils/models/mirror-node-models/transactionIdOrEthHashPathParam.ts new file mode 100644 index 00000000..14846f6d --- /dev/null +++ b/src/utils/models/mirror-node-models/transactionIdOrEthHashPathParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Transaction Id or a 32 byte hash with optional 0x prefix + */ +export type transactionIdOrEthHashPathParam = string; diff --git a/src/utils/models/mirror-node-models/transactionIdPathParam.ts b/src/utils/models/mirror-node-models/transactionIdPathParam.ts new file mode 100644 index 00000000..bf8f7a55 --- /dev/null +++ b/src/utils/models/mirror-node-models/transactionIdPathParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Transaction id + */ +export type transactionIdPathParam = string; diff --git a/src/utils/models/mirror-node-models/transactionIndexQueryParam.ts b/src/utils/models/mirror-node-models/transactionIndexQueryParam.ts new file mode 100644 index 00000000..f78b2f7a --- /dev/null +++ b/src/utils/models/mirror-node-models/transactionIndexQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The transaction index in the block + */ +export type transactionIndexQueryParam = number; diff --git a/src/utils/models/mirror-node-models/transactionTypeQueryParam.ts b/src/utils/models/mirror-node-models/transactionTypeQueryParam.ts new file mode 100644 index 00000000..f28b850d --- /dev/null +++ b/src/utils/models/mirror-node-models/transactionTypeQueryParam.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { TransactionTypes } from './TransactionTypes'; +export type transactionTypeQueryParam = TransactionTypes; diff --git a/src/utils/models/mirror-node-models/transactionsQueryParam.ts b/src/utils/models/mirror-node-models/transactionsQueryParam.ts new file mode 100644 index 00000000..6d0cc75f --- /dev/null +++ b/src/utils/models/mirror-node-models/transactionsQueryParam.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * If provided and set to false transactions will not be included in the response + */ +export type transactionsQueryParam = boolean; diff --git a/tsconfig.json b/tsconfig.json index 5178fc8e..846f7f2a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,7 +14,8 @@ "@helpers/*": ["src/utils/helpers/*"], "@services/*": ["src/services/*"], "@constants/*": ["src/utils/constants/*"], - "@enums/*": ["src/utils/enums/*"] + "@enums/*": ["src/utils/enums/*"], + "@models/*": ["src/utils/models/*"] } }, "include": ["src/**/*.ts", "src/tests/**/*.ts"],