diff --git a/Cargo.lock b/Cargo.lock index 7200a4b..c88a344 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -467,6 +467,21 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +[[package]] +name = "coinbase-mesh" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e8e3d7eeb99a7f0b6ae4b2d992627e1ba5fbe0ed2a399b9d788522199f086ea" +dependencies = [ + "reqwest", + "serde", + "serde_json", + "serde_repr", + "serde_with", + "url", + "uuid", +] + [[package]] name = "colorchoice" version = "1.0.2" @@ -1255,9 +1270,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1492,18 +1507,6 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "mesh" -version = "1.4.13" -dependencies = [ - "reqwest", - "serde", - "serde_json", - "serde_with", - "url", - "uuid", -] - [[package]] name = "mime" version = "0.3.17" @@ -1528,6 +1531,7 @@ dependencies = [ "anyhow", "axum", "clap", + "coinbase-mesh", "convert_case", "cynic", "cynic-codegen", @@ -1538,7 +1542,6 @@ dependencies = [ "futures", "indoc", "insta", - "mesh", "paste", "reqwest", "serde", @@ -2382,6 +2385,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2396,9 +2410,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.9.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" +checksum = "9720086b3357bcb44fce40117d769a4d068c70ecfa190850a980a71755f66fcc" dependencies = [ "base64", "chrono", @@ -2414,9 +2428,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.9.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" +checksum = "5f1abbfe725f27678f4663bcacb75a83e829fd464c25d78dd038a3a29e307cec" dependencies = [ "darling", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 6646203..09b4677 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,13 +17,13 @@ aide = { version = "0.13.4", features = ["scalar"] } anyhow = "1.0.86" axum = { version = "0.7.5", features = ["macros"] } clap = { version = "4.5.11", features = ["derive", "env"] } +coinbase-mesh = "0.1.0" convert_case = "0.6.0" cynic = { version = "3.7.3", features = ["http-reqwest-blocking"] } derive_more = { version = "1.0.0", features = ["full"] } dotenv = "0.15.0" envy = "0.4.2" futures = "0.3.30" -mesh = { path = "./mesh_generated" } paste = "1.0.15" reqwest = { version = "0.12.5", features = ["json", "blocking"] } serde = { version = "1.0.204", features = ["derive"] } diff --git a/cspell.json b/cspell.json index e46a20c..362f735 100644 --- a/cspell.json +++ b/cspell.json @@ -10,16 +10,15 @@ "enableGlobDot": true, "dictionaries": ["project-words", "rust"], "ignorePaths": [ - ".git/**", - ".sqlx/**", - "mesh_generated/**", + ".git", + ".sqlx", "src/graphql/schema/mina_schema.graphql", - "sql/**", + "sql", "static/scalar.standalone.min.js", - "target/**", + "target", "tests/snapshots", "flake.*", - "nix/**", + "nix", ".gitignore" ], "useGitignore": true, diff --git a/dprint.json b/dprint.json index c57d574..7100330 100644 --- a/dprint.json +++ b/dprint.json @@ -20,6 +20,6 @@ "https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm", "https://plugins.dprint.dev/json-0.19.3.wasm", "https://plugins.dprint.dev/markdown-0.17.8.wasm", - "https://plugins.dprint.dev/toml-0.6.2.wasm" + "https://plugins.dprint.dev/toml-0.6.3.wasm" ] } diff --git a/mesh_generated/.gitignore b/mesh_generated/.gitignore deleted file mode 100644 index 6aa1064..0000000 --- a/mesh_generated/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target/ -**/*.rs.bk -Cargo.lock diff --git a/mesh_generated/.openapi-generator-ignore b/mesh_generated/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/mesh_generated/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/mesh_generated/.openapi-generator/FILES b/mesh_generated/.openapi-generator/FILES deleted file mode 100644 index 223daa1..0000000 --- a/mesh_generated/.openapi-generator/FILES +++ /dev/null @@ -1,173 +0,0 @@ -.gitignore -.travis.yml -Cargo.toml -README.md -docs/AccountApi.md -docs/AccountBalanceRequest.md -docs/AccountBalanceResponse.md -docs/AccountCoinsRequest.md -docs/AccountCoinsResponse.md -docs/AccountIdentifier.md -docs/Allow.md -docs/Amount.md -docs/BalanceExemption.md -docs/Block.md -docs/BlockApi.md -docs/BlockEvent.md -docs/BlockEventType.md -docs/BlockIdentifier.md -docs/BlockRequest.md -docs/BlockResponse.md -docs/BlockTransaction.md -docs/BlockTransactionRequest.md -docs/BlockTransactionResponse.md -docs/CallApi.md -docs/CallRequest.md -docs/CallResponse.md -docs/Case.md -docs/Coin.md -docs/CoinAction.md -docs/CoinChange.md -docs/CoinIdentifier.md -docs/ConstructionApi.md -docs/ConstructionCombineRequest.md -docs/ConstructionCombineResponse.md -docs/ConstructionDeriveRequest.md -docs/ConstructionDeriveResponse.md -docs/ConstructionHashRequest.md -docs/ConstructionMetadataRequest.md -docs/ConstructionMetadataResponse.md -docs/ConstructionParseRequest.md -docs/ConstructionParseResponse.md -docs/ConstructionPayloadsRequest.md -docs/ConstructionPayloadsResponse.md -docs/ConstructionPreprocessRequest.md -docs/ConstructionPreprocessResponse.md -docs/ConstructionSubmitRequest.md -docs/Currency.md -docs/CurveType.md -docs/Direction.md -docs/Error.md -docs/EventsApi.md -docs/EventsBlocksRequest.md -docs/EventsBlocksResponse.md -docs/ExemptionType.md -docs/MempoolApi.md -docs/MempoolResponse.md -docs/MempoolTransactionRequest.md -docs/MempoolTransactionResponse.md -docs/MetadataRequest.md -docs/NetworkApi.md -docs/NetworkIdentifier.md -docs/NetworkListResponse.md -docs/NetworkOptionsResponse.md -docs/NetworkRequest.md -docs/NetworkStatusResponse.md -docs/Operation.md -docs/OperationIdentifier.md -docs/OperationStatus.md -docs/Operator.md -docs/PartialBlockIdentifier.md -docs/Peer.md -docs/PublicKey.md -docs/RelatedTransaction.md -docs/SearchApi.md -docs/SearchTransactionsRequest.md -docs/SearchTransactionsResponse.md -docs/Signature.md -docs/SignatureType.md -docs/SigningPayload.md -docs/SubAccountIdentifier.md -docs/SubNetworkIdentifier.md -docs/SyncStatus.md -docs/Transaction.md -docs/TransactionIdentifier.md -docs/TransactionIdentifierResponse.md -docs/Version.md -git_push.sh -src/apis/account_api.rs -src/apis/block_api.rs -src/apis/call_api.rs -src/apis/configuration.rs -src/apis/construction_api.rs -src/apis/events_api.rs -src/apis/mempool_api.rs -src/apis/mod.rs -src/apis/network_api.rs -src/apis/search_api.rs -src/lib.rs -src/models/account_balance_request.rs -src/models/account_balance_response.rs -src/models/account_coins_request.rs -src/models/account_coins_response.rs -src/models/account_identifier.rs -src/models/allow.rs -src/models/amount.rs -src/models/balance_exemption.rs -src/models/block.rs -src/models/block_event.rs -src/models/block_event_type.rs -src/models/block_identifier.rs -src/models/block_request.rs -src/models/block_response.rs -src/models/block_transaction.rs -src/models/block_transaction_request.rs -src/models/block_transaction_response.rs -src/models/call_request.rs -src/models/call_response.rs -src/models/case.rs -src/models/coin.rs -src/models/coin_action.rs -src/models/coin_change.rs -src/models/coin_identifier.rs -src/models/construction_combine_request.rs -src/models/construction_combine_response.rs -src/models/construction_derive_request.rs -src/models/construction_derive_response.rs -src/models/construction_hash_request.rs -src/models/construction_metadata_request.rs -src/models/construction_metadata_response.rs -src/models/construction_parse_request.rs -src/models/construction_parse_response.rs -src/models/construction_payloads_request.rs -src/models/construction_payloads_response.rs -src/models/construction_preprocess_request.rs -src/models/construction_preprocess_response.rs -src/models/construction_submit_request.rs -src/models/currency.rs -src/models/curve_type.rs -src/models/direction.rs -src/models/error.rs -src/models/events_blocks_request.rs -src/models/events_blocks_response.rs -src/models/exemption_type.rs -src/models/mempool_response.rs -src/models/mempool_transaction_request.rs -src/models/mempool_transaction_response.rs -src/models/metadata_request.rs -src/models/mod.rs -src/models/network_identifier.rs -src/models/network_list_response.rs -src/models/network_options_response.rs -src/models/network_request.rs -src/models/network_status_response.rs -src/models/operation.rs -src/models/operation_identifier.rs -src/models/operation_status.rs -src/models/operator.rs -src/models/partial_block_identifier.rs -src/models/peer.rs -src/models/public_key.rs -src/models/related_transaction.rs -src/models/search_transactions_request.rs -src/models/search_transactions_response.rs -src/models/signature.rs -src/models/signature_type.rs -src/models/signing_payload.rs -src/models/sub_account_identifier.rs -src/models/sub_network_identifier.rs -src/models/sync_status.rs -src/models/transaction.rs -src/models/transaction_identifier.rs -src/models/transaction_identifier_response.rs -src/models/version.rs diff --git a/mesh_generated/.openapi-generator/VERSION b/mesh_generated/.openapi-generator/VERSION deleted file mode 100644 index 1985849..0000000 --- a/mesh_generated/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.7.0 diff --git a/mesh_generated/.travis.yml b/mesh_generated/.travis.yml deleted file mode 100644 index 22761ba..0000000 --- a/mesh_generated/.travis.yml +++ /dev/null @@ -1 +0,0 @@ -language: rust diff --git a/mesh_generated/Cargo.toml b/mesh_generated/Cargo.toml deleted file mode 100644 index 633d518..0000000 --- a/mesh_generated/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "mesh" -version = "1.4.13" -authors = ["OpenAPI Generator team and contributors"] -edition = "2021" -license = "Apache 2.0" -description = "Build Once. Integrate Your Blockchain Everywhere. " - -[dependencies] -reqwest = { version = "^0.12", features = ["json", "multipart"] } -serde = { version = "^1.0", features = ["derive"] } -serde_json = "^1.0" -serde_with = { version = "^3.8", default-features = false, features = ["base64", "std", "macros"] } -url = "^2.5" -uuid = { version = "^1.8", features = ["serde", "v4"] } diff --git a/mesh_generated/README.md b/mesh_generated/README.md deleted file mode 100644 index 753756d..0000000 --- a/mesh_generated/README.md +++ /dev/null @@ -1,135 +0,0 @@ -# Rust API client for mesh - -Build Once. Integrate Your Blockchain Everywhere. - -## Overview - -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By -using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API -client. - -- API version: 1.4.13 -- Package version: 1.4.13 -- Generator version: 7.7.0 -- Build package: `org.openapitools.codegen.languages.RustClientCodegen` - -## Installation - -Put the package under your project folder in a directory named `mesh` and add the following to -`Cargo.toml` under `[dependencies]`: - -``` -mesh = { path = "./mesh" } -``` - -## Documentation for API Endpoints - -All URIs are relative to _http://localhost_ - -| Class | Method | HTTP request | Description | -| ----------------- | ------------------------------------------------------------------------------ | --------------------------------- | ----------------------------------------------------- | -| _AccountApi_ | [**account_balance**](docs/AccountApi.md#account_balance) | **POST** /account/balance | Get an Account's Balance | -| _AccountApi_ | [**account_coins**](docs/AccountApi.md#account_coins) | **POST** /account/coins | Get an Account's Unspent Coins | -| _BlockApi_ | [**block**](docs/BlockApi.md#block) | **POST** /block | Get a Block | -| _BlockApi_ | [**block_transaction**](docs/BlockApi.md#block_transaction) | **POST** /block/transaction | Get a Block Transaction | -| _CallApi_ | [**call**](docs/CallApi.md#call) | **POST** /call | Make a Network-Specific Procedure Call | -| _ConstructionApi_ | [**construction_combine**](docs/ConstructionApi.md#construction_combine) | **POST** /construction/combine | Create Network Transaction from Signatures | -| _ConstructionApi_ | [**construction_derive**](docs/ConstructionApi.md#construction_derive) | **POST** /construction/derive | Derive an AccountIdentifier from a PublicKey | -| _ConstructionApi_ | [**construction_hash**](docs/ConstructionApi.md#construction_hash) | **POST** /construction/hash | Get the Hash of a Signed Transaction | -| _ConstructionApi_ | [**construction_metadata**](docs/ConstructionApi.md#construction_metadata) | **POST** /construction/metadata | Get Metadata for Transaction Construction | -| _ConstructionApi_ | [**construction_parse**](docs/ConstructionApi.md#construction_parse) | **POST** /construction/parse | Parse a Transaction | -| _ConstructionApi_ | [**construction_payloads**](docs/ConstructionApi.md#construction_payloads) | **POST** /construction/payloads | Generate an Unsigned Transaction and Signing Payloads | -| _ConstructionApi_ | [**construction_preprocess**](docs/ConstructionApi.md#construction_preprocess) | **POST** /construction/preprocess | Create a Request to Fetch Metadata | -| _ConstructionApi_ | [**construction_submit**](docs/ConstructionApi.md#construction_submit) | **POST** /construction/submit | Submit a Signed Transaction | -| _EventsApi_ | [**events_blocks**](docs/EventsApi.md#events_blocks) | **POST** /events/blocks | [INDEXER] Get a range of BlockEvents | -| _MempoolApi_ | [**mempool**](docs/MempoolApi.md#mempool) | **POST** /mempool | Get All Mempool Transactions | -| _MempoolApi_ | [**mempool_transaction**](docs/MempoolApi.md#mempool_transaction) | **POST** /mempool/transaction | Get a Mempool Transaction | -| _NetworkApi_ | [**network_list**](docs/NetworkApi.md#network_list) | **POST** /network/list | Get List of Available Networks | -| _NetworkApi_ | [**network_options**](docs/NetworkApi.md#network_options) | **POST** /network/options | Get Network Options | -| _NetworkApi_ | [**network_status**](docs/NetworkApi.md#network_status) | **POST** /network/status | Get Network Status | -| _SearchApi_ | [**search_transactions**](docs/SearchApi.md#search_transactions) | **POST** /search/transactions | [INDEXER] Search for Transactions | - -## Documentation For Models - -- [AccountBalanceRequest](docs/AccountBalanceRequest.md) -- [AccountBalanceResponse](docs/AccountBalanceResponse.md) -- [AccountCoinsRequest](docs/AccountCoinsRequest.md) -- [AccountCoinsResponse](docs/AccountCoinsResponse.md) -- [AccountIdentifier](docs/AccountIdentifier.md) -- [Allow](docs/Allow.md) -- [Amount](docs/Amount.md) -- [BalanceExemption](docs/BalanceExemption.md) -- [Block](docs/Block.md) -- [BlockEvent](docs/BlockEvent.md) -- [BlockEventType](docs/BlockEventType.md) -- [BlockIdentifier](docs/BlockIdentifier.md) -- [BlockRequest](docs/BlockRequest.md) -- [BlockResponse](docs/BlockResponse.md) -- [BlockTransaction](docs/BlockTransaction.md) -- [BlockTransactionRequest](docs/BlockTransactionRequest.md) -- [BlockTransactionResponse](docs/BlockTransactionResponse.md) -- [CallRequest](docs/CallRequest.md) -- [CallResponse](docs/CallResponse.md) -- [Case](docs/Case.md) -- [Coin](docs/Coin.md) -- [CoinAction](docs/CoinAction.md) -- [CoinChange](docs/CoinChange.md) -- [CoinIdentifier](docs/CoinIdentifier.md) -- [ConstructionCombineRequest](docs/ConstructionCombineRequest.md) -- [ConstructionCombineResponse](docs/ConstructionCombineResponse.md) -- [ConstructionDeriveRequest](docs/ConstructionDeriveRequest.md) -- [ConstructionDeriveResponse](docs/ConstructionDeriveResponse.md) -- [ConstructionHashRequest](docs/ConstructionHashRequest.md) -- [ConstructionMetadataRequest](docs/ConstructionMetadataRequest.md) -- [ConstructionMetadataResponse](docs/ConstructionMetadataResponse.md) -- [ConstructionParseRequest](docs/ConstructionParseRequest.md) -- [ConstructionParseResponse](docs/ConstructionParseResponse.md) -- [ConstructionPayloadsRequest](docs/ConstructionPayloadsRequest.md) -- [ConstructionPayloadsResponse](docs/ConstructionPayloadsResponse.md) -- [ConstructionPreprocessRequest](docs/ConstructionPreprocessRequest.md) -- [ConstructionPreprocessResponse](docs/ConstructionPreprocessResponse.md) -- [ConstructionSubmitRequest](docs/ConstructionSubmitRequest.md) -- [Currency](docs/Currency.md) -- [CurveType](docs/CurveType.md) -- [Direction](docs/Direction.md) -- [Error](docs/Error.md) -- [EventsBlocksRequest](docs/EventsBlocksRequest.md) -- [EventsBlocksResponse](docs/EventsBlocksResponse.md) -- [ExemptionType](docs/ExemptionType.md) -- [MempoolResponse](docs/MempoolResponse.md) -- [MempoolTransactionRequest](docs/MempoolTransactionRequest.md) -- [MempoolTransactionResponse](docs/MempoolTransactionResponse.md) -- [MetadataRequest](docs/MetadataRequest.md) -- [NetworkIdentifier](docs/NetworkIdentifier.md) -- [NetworkListResponse](docs/NetworkListResponse.md) -- [NetworkOptionsResponse](docs/NetworkOptionsResponse.md) -- [NetworkRequest](docs/NetworkRequest.md) -- [NetworkStatusResponse](docs/NetworkStatusResponse.md) -- [Operation](docs/Operation.md) -- [OperationIdentifier](docs/OperationIdentifier.md) -- [OperationStatus](docs/OperationStatus.md) -- [Operator](docs/Operator.md) -- [PartialBlockIdentifier](docs/PartialBlockIdentifier.md) -- [Peer](docs/Peer.md) -- [PublicKey](docs/PublicKey.md) -- [RelatedTransaction](docs/RelatedTransaction.md) -- [SearchTransactionsRequest](docs/SearchTransactionsRequest.md) -- [SearchTransactionsResponse](docs/SearchTransactionsResponse.md) -- [Signature](docs/Signature.md) -- [SignatureType](docs/SignatureType.md) -- [SigningPayload](docs/SigningPayload.md) -- [SubAccountIdentifier](docs/SubAccountIdentifier.md) -- [SubNetworkIdentifier](docs/SubNetworkIdentifier.md) -- [SyncStatus](docs/SyncStatus.md) -- [Transaction](docs/Transaction.md) -- [TransactionIdentifier](docs/TransactionIdentifier.md) -- [TransactionIdentifierResponse](docs/TransactionIdentifierResponse.md) -- [Version](docs/Version.md) - -To get access to the crate's generated documentation, use: - -``` -cargo doc --open -``` - -## Author diff --git a/mesh_generated/docs/AccountApi.md b/mesh_generated/docs/AccountApi.md deleted file mode 100644 index 44af0bf..0000000 --- a/mesh_generated/docs/AccountApi.md +++ /dev/null @@ -1,83 +0,0 @@ -# \AccountApi - -All URIs are relative to _http://localhost_ - -| Method | HTTP request | Description | -| ---------------------------------------------------- | ------------------------- | ------------------------------ | -| [**account_balance**](AccountApi.md#account_balance) | **POST** /account/balance | Get an Account's Balance | -| [**account_coins**](AccountApi.md#account_coins) | **POST** /account/coins | Get an Account's Unspent Coins | - -## account_balance - -> models::AccountBalanceResponse account_balance(account_balance_request) Get an Account's Balance - -Get an array of all AccountBalances for an AccountIdentifier and the BlockIdentifier at which the -balance lookup was performed. The BlockIdentifier must always be returned because some consumers of -account balance data need to know specifically at which block the balance was calculated to compare -balances they compute from operations with the balance returned by the node. It is important to note -that making a balance request for an account without populating the SubAccountIdentifier should not -result in the balance of all possible SubAccountIdentifiers being returned. Rather, it should result -in the balance pertaining to no SubAccountIdentifiers being returned (sometimes called the liquid -balance). To get all balances associated with an account, it may be necessary to perform multiple -balance requests with unique AccountIdentifiers. It is also possible to perform a historical balance -lookup (if the server supports it) by passing in an optional BlockIdentifier. - -### Parameters - -| Name | Type | Description | Required | Notes | -| --------------------------- | ----------------------------------------------------- | ----------- | ---------- | ----- | -| **account_balance_request** | [**AccountBalanceRequest**](AccountBalanceRequest.md) | | [required] | | - -### Return type - -[**models::AccountBalanceResponse**](AccountBalanceResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -## account_coins - -> models::AccountCoinsResponse account_coins(account_coins_request) Get an Account's Unspent Coins - -Get an array of all unspent coins for an AccountIdentifier and the BlockIdentifier at which the -lookup was performed. If your implementation does not support coins (i.e. it is for an account-based -blockchain), you do not need to implement this endpoint. If you implementation does support coins -(i.e. it is fro a UTXO-based blockchain), you MUST also complete the `/account/balance` endpoint. It -is important to note that making a coins request for an account without populating the -SubAccountIdentifier should not result in the coins of all possible SubAccountIdentifiers being -returned. Rather, it should result in the coins pertaining to no SubAccountIdentifiers being -returned. To get all coins associated with an account, it may be necessary to perform multiple coin -requests with unique AccountIdentifiers. Optionally, an implementation may choose to support -updating an AccountIdentifier's unspent coins based on the contents of the mempool. Note, using this -functionality breaks any guarantee of idempotency. - -### Parameters - -| Name | Type | Description | Required | Notes | -| ------------------------- | ------------------------------------------------- | ----------- | ---------- | ----- | -| **account_coins_request** | [**AccountCoinsRequest**](AccountCoinsRequest.md) | | [required] | | - -### Return type - -[**models::AccountCoinsResponse**](AccountCoinsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/AccountBalanceRequest.md b/mesh_generated/docs/AccountBalanceRequest.md deleted file mode 100644 index 646c1b7..0000000 --- a/mesh_generated/docs/AccountBalanceRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# AccountBalanceRequest - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **account_identifier** | [**models::AccountIdentifier**](AccountIdentifier.md) | | | -| **block_identifier** | Option<[**models::PartialBlockIdentifier**](PartialBlockIdentifier.md)> | | [optional] | -| **currencies** | Option<[**Vec**](Currency.md)> | In some cases, the caller may not want to retrieve all available balances for an AccountIdentifier. If the currencies field is populated, only balances for the specified currencies will be returned. If not populated, all available balances will be returned. | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/AccountBalanceResponse.md b/mesh_generated/docs/AccountBalanceResponse.md deleted file mode 100644 index 5dbd089..0000000 --- a/mesh_generated/docs/AccountBalanceResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccountBalanceResponse - -## Properties - -| Name | Type | Description | Notes | -| -------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **block_identifier** | [**models::BlockIdentifier**](BlockIdentifier.md) | | | -| **balances** | [**Vec**](Amount.md) | A single account may have a balance in multiple currencies. | | -| **metadata** | Option<[**serde_json::Value**](.md)> | Account-based blockchains that utilize a nonce or sequence number should include that number in the metadata. This number could be unique to the identifier or global across the account address. | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/AccountCoinsRequest.md b/mesh_generated/docs/AccountCoinsRequest.md deleted file mode 100644 index 07e755d..0000000 --- a/mesh_generated/docs/AccountCoinsRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# AccountCoinsRequest - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **account_identifier** | [**models::AccountIdentifier**](AccountIdentifier.md) | | | -| **include_mempool** | **bool** | Include state from the mempool when looking up an account's unspent coins. Note, using this functionality breaks any guarantee of idempotency. | | -| **currencies** | Option<[**Vec**](Currency.md)> | In some cases, the caller may not want to retrieve coins for all currencies for an AccountIdentifier. If the currencies field is populated, only coins for the specified currencies will be returned. If not populated, all unspent coins will be returned. | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/AccountCoinsResponse.md b/mesh_generated/docs/AccountCoinsResponse.md deleted file mode 100644 index 61fd6cf..0000000 --- a/mesh_generated/docs/AccountCoinsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccountCoinsResponse - -## Properties - -| Name | Type | Description | Notes | -| -------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **block_identifier** | [**models::BlockIdentifier**](BlockIdentifier.md) | | | -| **coins** | [**Vec**](Coin.md) | If a blockchain is UTXO-based, all unspent Coins owned by an account_identifier should be returned alongside the balance. It is highly recommended to populate this field so that users of the Rosetta API implementation don't need to maintain their own indexer to track their UTXOs. | | -| **metadata** | Option<[**serde_json::Value**](.md)> | Account-based blockchains that utilize a nonce or sequence number should include that number in the metadata. This number could be unique to the identifier or global across the account address. | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/AccountIdentifier.md b/mesh_generated/docs/AccountIdentifier.md deleted file mode 100644 index 5930b26..0000000 --- a/mesh_generated/docs/AccountIdentifier.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccountIdentifier - -## Properties - -| Name | Type | Description | Notes | -| --------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **address** | **String** | The address may be a cryptographic public key (or some encoding of it) or a provided username. | | -| **sub_account** | Option<[**models::SubAccountIdentifier**](SubAccountIdentifier.md)> | | [optional] | -| **metadata** | Option<[**serde_json::Value**](.md)> | Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata. | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/Allow.md b/mesh_generated/docs/Allow.md deleted file mode 100644 index e23f359..0000000 --- a/mesh_generated/docs/Allow.md +++ /dev/null @@ -1,19 +0,0 @@ -# Allow - -## Properties - -| Name | Type | Description | Notes | -| ----------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **operation_statuses** | [**Vec**](OperationStatus.md) | All Operation.Status this implementation supports. Any status that is returned during parsing that is not listed here will cause client validation to error. | | -| **operation_types** | **Vec** | All Operation.Type this implementation supports. Any type that is returned during parsing that is not listed here will cause client validation to error. | | -| **errors** | [**Vec**](Error.md) | All Errors that this implementation could return. Any error that is returned during parsing that is not listed here will cause client validation to error. | | -| **historical_balance_lookup** | **bool** | Any Rosetta implementation that supports querying the balance of an account at any height in the past should set this to true. | | -| **timestamp_start_index** | Option<**i64**> | If populated, `timestamp_start_index` indicates the first block index where block timestamps are considered valid (i.e. all blocks less than `timestamp_start_index` could have invalid timestamps). This is useful when the genesis block (or blocks) of a network have timestamp 0. If not populated, block timestamps are assumed to be valid for all available blocks. | [optional] | -| **call_methods** | **Vec** | All methods that are supported by the /call endpoint. Communicating which parameters should be provided to /call is the responsibility of the implementer (this is en lieu of defining an entire type system and requiring the implementer to define that in Allow). | | -| **balance_exemptions** | [**Vec**](BalanceExemption.md) | BalanceExemptions is an array of BalanceExemption indicating which account balances could change without a corresponding Operation. BalanceExemptions should be used sparingly as they may introduce significant complexity for integrators that attempt to reconcile all account balance changes. If your implementation relies on any BalanceExemptions, you MUST implement historical balance lookup (the ability to query an account balance at any BlockIdentifier). | | -| **mempool_coins** | **bool** | Any Rosetta implementation that can update an AccountIdentifier's unspent coins based on the contents of the mempool should populate this field as true. If false, requests to `/account/coins` that set `include_mempool` as true will be automatically rejected. | | -| **block_hash_case** | Option<[**models::Case**](Case.md)> | | [optional] | -| **transaction_hash_case** | Option<[**models::Case**](Case.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/Amount.md b/mesh_generated/docs/Amount.md deleted file mode 100644 index 5992b86..0000000 --- a/mesh_generated/docs/Amount.md +++ /dev/null @@ -1,12 +0,0 @@ -# Amount - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **value** | **String** | Value of the transaction in atomic units represented as an arbitrary-sized signed integer. For example, 1 BTC would be represented by a value of 100000000. | | -| **currency** | [**models::Currency**](Currency.md) | | | -| **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/BalanceExemption.md b/mesh_generated/docs/BalanceExemption.md deleted file mode 100644 index 191f29e..0000000 --- a/mesh_generated/docs/BalanceExemption.md +++ /dev/null @@ -1,12 +0,0 @@ -# BalanceExemption - -## Properties - -| Name | Type | Description | Notes | -| ----------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -| **sub_account_address** | Option<**String**> | SubAccountAddress is the SubAccountIdentifier.Address that the BalanceExemption applies to (regardless of the value of SubAccountIdentifier.Metadata). | [optional] | -| **currency** | Option<[**models::Currency**](Currency.md)> | | [optional] | -| **exemption_type** | Option<[**models::ExemptionType**](ExemptionType.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/Block.md b/mesh_generated/docs/Block.md deleted file mode 100644 index 67b919e..0000000 --- a/mesh_generated/docs/Block.md +++ /dev/null @@ -1,14 +0,0 @@ -# Block - -## Properties - -| Name | Type | Description | Notes | -| --------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **block_identifier** | [**models::BlockIdentifier**](BlockIdentifier.md) | | | -| **parent_block_identifier** | [**models::BlockIdentifier**](BlockIdentifier.md) | | | -| **timestamp** | **i64** | The timestamp of the block in milliseconds since the Unix Epoch. The timestamp is stored in milliseconds because some blockchains produce blocks more often than once a second. | | -| **transactions** | [**Vec**](Transaction.md) | | | -| **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/BlockApi.md b/mesh_generated/docs/BlockApi.md deleted file mode 100644 index abdf422..0000000 --- a/mesh_generated/docs/BlockApi.md +++ /dev/null @@ -1,84 +0,0 @@ -# \BlockApi - -All URIs are relative to _http://localhost_ - -| Method | HTTP request | Description | -| ------------------------------------------------------ | --------------------------- | ----------------------- | -| [**block**](BlockApi.md#block) | **POST** /block | Get a Block | -| [**block_transaction**](BlockApi.md#block_transaction) | **POST** /block/transaction | Get a Block Transaction | - -## block - -> models::BlockResponse block(block_request) Get a Block - -Get a block by its Block Identifier. If transactions are returned in the same call to the node as -fetching the block, the response should include these transactions in the Block object. If not, an -array of Transaction Identifiers should be returned so /block/transaction fetches can be done to get -all transaction information. When requesting a block by the hash component of the BlockIdentifier, -this request MUST be idempotent: repeated invocations for the same hash-identified block must return -the exact same block contents. No such restriction is imposed when requesting a block by height, -given that a chain reorg event might cause the specific block at height `n` to be set to a different -one. - -### Parameters - -| Name | Type | Description | Required | Notes | -| ----------------- | ----------------------------------- | ----------- | ---------- | ----- | -| **block_request** | [**BlockRequest**](BlockRequest.md) | | [required] | | - -### Return type - -[**models::BlockResponse**](BlockResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -## block_transaction - -> models::BlockTransactionResponse block_transaction(block_transaction_request) Get a Block -> Transaction - -Get a transaction in a block by its Transaction Identifier. This endpoint should only be used when -querying a node for a block does not return all transactions contained within it. All transactions -returned by this endpoint must be appended to any transactions returned by the /block method by -consumers of this data. Fetching a transaction by hash is considered an Explorer Method (which is -classified under the Future Work section). This method can be used to let consumers to paginate -results when the block trasactions count is too big to be returned in a single BlockResponse. -Calling this endpoint requires reference to a BlockIdentifier because transaction parsing can change -depending on which block contains the transaction. For example, in Bitcoin it is necessary to know -which block contains a transaction to determine the destination of fee payments. Without specifying -a block identifier, the node would have to infer which block to use (which could change during a -re-org). Implementations that require fetching previous transactions to populate the response (ex: -Previous UTXOs in Bitcoin) may find it useful to run a cache within the Rosetta server in the /data -directory (on a path that does not conflict with the node). - -### Parameters - -| Name | Type | Description | Required | Notes | -| ----------------------------- | --------------------------------------------------------- | ----------- | ---------- | ----- | -| **block_transaction_request** | [**BlockTransactionRequest**](BlockTransactionRequest.md) | | [required] | | - -### Return type - -[**models::BlockTransactionResponse**](BlockTransactionResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/BlockEvent.md b/mesh_generated/docs/BlockEvent.md deleted file mode 100644 index ee62b4f..0000000 --- a/mesh_generated/docs/BlockEvent.md +++ /dev/null @@ -1,12 +0,0 @@ -# BlockEvent - -## Properties - -| Name | Type | Description | Notes | -| -------------------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------- | ----- | -| **sequence** | **i64** | sequence is the unique identifier of a BlockEvent within the context of a NetworkIdentifier. | | -| **block_identifier** | [**models::BlockIdentifier**](BlockIdentifier.md) | | | -| **r#type** | [**models::BlockEventType**](BlockEventType.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/BlockEventType.md b/mesh_generated/docs/BlockEventType.md deleted file mode 100644 index 03badac..0000000 --- a/mesh_generated/docs/BlockEventType.md +++ /dev/null @@ -1,11 +0,0 @@ -# BlockEventType - -## Enum Variants - -| Name | Value | -| ------- | ------------- | -| Added | block_added | -| Removed | block_removed | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/BlockIdentifier.md b/mesh_generated/docs/BlockIdentifier.md deleted file mode 100644 index 3dcd19d..0000000 --- a/mesh_generated/docs/BlockIdentifier.md +++ /dev/null @@ -1,11 +0,0 @@ -# BlockIdentifier - -## Properties - -| Name | Type | Description | Notes | -| --------- | ---------- | ------------------------------------------------------------------------------------------------- | ----- | -| **index** | **i64** | This is also known as the block height. | | -| **hash** | **String** | This should be normalized according to the case specified in the block_hash_case network options. | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/BlockRequest.md b/mesh_generated/docs/BlockRequest.md deleted file mode 100644 index 1b59096..0000000 --- a/mesh_generated/docs/BlockRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# BlockRequest - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | --------------------------------------------------------------- | ----------- | ----- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **block_identifier** | [**models::PartialBlockIdentifier**](PartialBlockIdentifier.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/BlockResponse.md b/mesh_generated/docs/BlockResponse.md deleted file mode 100644 index dab0017..0000000 --- a/mesh_generated/docs/BlockResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# BlockResponse - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -| **block** | Option<[**models::Block**](Block.md)> | | [optional] | -| **other_transactions** | Option<[**Vec**](TransactionIdentifier.md)> | Some blockchains may require additional transactions to be fetched that weren't returned in the block response (ex: block only returns transaction hashes). For blockchains with a lot of transactions in each block, this can be very useful as consumers can concurrently fetch all transactions returned. | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/BlockTransaction.md b/mesh_generated/docs/BlockTransaction.md deleted file mode 100644 index 4a9c8ca..0000000 --- a/mesh_generated/docs/BlockTransaction.md +++ /dev/null @@ -1,11 +0,0 @@ -# BlockTransaction - -## Properties - -| Name | Type | Description | Notes | -| -------------------- | ------------------------------------------------- | ----------- | ----- | -| **block_identifier** | [**models::BlockIdentifier**](BlockIdentifier.md) | | | -| **transaction** | [**models::Transaction**](Transaction.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/BlockTransactionRequest.md b/mesh_generated/docs/BlockTransactionRequest.md deleted file mode 100644 index 07dcc8a..0000000 --- a/mesh_generated/docs/BlockTransactionRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# BlockTransactionRequest - -## Properties - -| Name | Type | Description | Notes | -| -------------------------- | ------------------------------------------------------------- | ----------- | ----- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **block_identifier** | [**models::BlockIdentifier**](BlockIdentifier.md) | | | -| **transaction_identifier** | [**models::TransactionIdentifier**](TransactionIdentifier.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/BlockTransactionResponse.md b/mesh_generated/docs/BlockTransactionResponse.md deleted file mode 100644 index 7f131bf..0000000 --- a/mesh_generated/docs/BlockTransactionResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# BlockTransactionResponse - -## Properties - -| Name | Type | Description | Notes | -| --------------- | ----------------------------------------- | ----------- | ----- | -| **transaction** | [**models::Transaction**](Transaction.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/CallApi.md b/mesh_generated/docs/CallApi.md deleted file mode 100644 index 692c322..0000000 --- a/mesh_generated/docs/CallApi.md +++ /dev/null @@ -1,45 +0,0 @@ -# \CallApi - -All URIs are relative to _http://localhost_ - -| Method | HTTP request | Description | -| --------------------------- | -------------- | -------------------------------------- | -| [**call**](CallApi.md#call) | **POST** /call | Make a Network-Specific Procedure Call | - -## call - -> models::CallResponse call(call_request) Make a Network-Specific Procedure Call - -Call invokes an arbitrary, network-specific procedure call with network-specific parameters. The -guidance for what this endpoint should or could do is purposely left vague. In Ethereum, this could -be used to invoke `eth_call` to implement an entire Rosetta API interface for some smart contract -that is not parsed by the implementation creator (like a DEX). This endpoint could also be used to -provide access to data that does not map to any Rosetta models instead of requiring an integrator to -use some network-specific SDK and call some network-specific endpoint (like surfacing staking -parameters). Call is NOT a replacement for implementing Rosetta API endpoints or mapping -network-specific data to Rosetta models. Rather, it enables developers to build additional Rosetta -API interfaces for things they care about without introducing complexity into a base-level Rosetta -implementation. Simply put, imagine that the average integrator will use layered Rosetta API -implementations that each surfaces unique data. - -### Parameters - -| Name | Type | Description | Required | Notes | -| ---------------- | --------------------------------- | ----------- | ---------- | ----- | -| **call_request** | [**CallRequest**](CallRequest.md) | | [required] | | - -### Return type - -[**models::CallResponse**](CallResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/CallRequest.md b/mesh_generated/docs/CallRequest.md deleted file mode 100644 index 9554ec7..0000000 --- a/mesh_generated/docs/CallRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CallRequest - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **method** | **String** | Method is some network-specific procedure call. This method could map to a network-specific RPC endpoint, a method in an SDK generated from a smart contract, or some hybrid of the two. The implementation must define all available methods in the Allow object. However, it is up to the caller to determine which parameters to provide when invoking `/call`. | | -| **parameters** | [**serde_json::Value**](.md) | Parameters is some network-specific argument for a method. It is up to the caller to determine which parameters to provide when invoking `/call`. | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/CallResponse.md b/mesh_generated/docs/CallResponse.md deleted file mode 100644 index 81f771b..0000000 --- a/mesh_generated/docs/CallResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# CallResponse - -## Properties - -| Name | Type | Description | Notes | -| -------------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| **result** | [**serde_json::Value**](.md) | Result contains the result of the `/call` invocation. This result will not be inspected or interpreted by Rosetta tooling and is left to the caller to decode. | | -| **idempotent** | **bool** | Idempotent indicates that if `/call` is invoked with the same CallRequest again, at any point in time, it will return the same CallResponse. Integrators may cache the CallResponse if this is set to true to avoid making unnecessary calls to the Rosetta implementation. For this reason, implementers should be very conservative about returning true here or they could cause issues for the caller. | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/Case.md b/mesh_generated/docs/Case.md deleted file mode 100644 index 9df01c7..0000000 --- a/mesh_generated/docs/Case.md +++ /dev/null @@ -1,13 +0,0 @@ -# Case - -## Enum Variants - -| Name | Value | -| ------------- | -------------- | -| UpperCase | upper_case | -| LowerCase | lower_case | -| CaseSensitive | case_sensitive | -| Null | null | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/Coin.md b/mesh_generated/docs/Coin.md deleted file mode 100644 index 097d83c..0000000 --- a/mesh_generated/docs/Coin.md +++ /dev/null @@ -1,11 +0,0 @@ -# Coin - -## Properties - -| Name | Type | Description | Notes | -| ------------------- | ----------------------------------------------- | ----------- | ----- | -| **coin_identifier** | [**models::CoinIdentifier**](CoinIdentifier.md) | | | -| **amount** | [**models::Amount**](Amount.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/CoinAction.md b/mesh_generated/docs/CoinAction.md deleted file mode 100644 index 614141c..0000000 --- a/mesh_generated/docs/CoinAction.md +++ /dev/null @@ -1,11 +0,0 @@ -# CoinAction - -## Enum Variants - -| Name | Value | -| ------- | ------------ | -| Created | coin_created | -| Spent | coin_spent | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/CoinChange.md b/mesh_generated/docs/CoinChange.md deleted file mode 100644 index aa9890c..0000000 --- a/mesh_generated/docs/CoinChange.md +++ /dev/null @@ -1,11 +0,0 @@ -# CoinChange - -## Properties - -| Name | Type | Description | Notes | -| ------------------- | ----------------------------------------------- | ----------- | ----- | -| **coin_identifier** | [**models::CoinIdentifier**](CoinIdentifier.md) | | | -| **coin_action** | [**models::CoinAction**](CoinAction.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/CoinIdentifier.md b/mesh_generated/docs/CoinIdentifier.md deleted file mode 100644 index 320ee3c..0000000 --- a/mesh_generated/docs/CoinIdentifier.md +++ /dev/null @@ -1,10 +0,0 @@ -# CoinIdentifier - -## Properties - -| Name | Type | Description | Notes | -| -------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| **identifier** | **String** | Identifier should be populated with a globally unique identifier of a Coin. In Bitcoin, this identifier would be transaction_hash:index. | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionApi.md b/mesh_generated/docs/ConstructionApi.md deleted file mode 100644 index a36a73f..0000000 --- a/mesh_generated/docs/ConstructionApi.md +++ /dev/null @@ -1,273 +0,0 @@ -# \ConstructionApi - -All URIs are relative to _http://localhost_ - -| Method | HTTP request | Description | -| ------------------------------------------------------------------------- | --------------------------------- | ----------------------------------------------------- | -| [**construction_combine**](ConstructionApi.md#construction_combine) | **POST** /construction/combine | Create Network Transaction from Signatures | -| [**construction_derive**](ConstructionApi.md#construction_derive) | **POST** /construction/derive | Derive an AccountIdentifier from a PublicKey | -| [**construction_hash**](ConstructionApi.md#construction_hash) | **POST** /construction/hash | Get the Hash of a Signed Transaction | -| [**construction_metadata**](ConstructionApi.md#construction_metadata) | **POST** /construction/metadata | Get Metadata for Transaction Construction | -| [**construction_parse**](ConstructionApi.md#construction_parse) | **POST** /construction/parse | Parse a Transaction | -| [**construction_payloads**](ConstructionApi.md#construction_payloads) | **POST** /construction/payloads | Generate an Unsigned Transaction and Signing Payloads | -| [**construction_preprocess**](ConstructionApi.md#construction_preprocess) | **POST** /construction/preprocess | Create a Request to Fetch Metadata | -| [**construction_submit**](ConstructionApi.md#construction_submit) | **POST** /construction/submit | Submit a Signed Transaction | - -## construction_combine - -> models::ConstructionCombineResponse construction_combine(construction_combine_request) Create -> Network Transaction from Signatures - -Combine creates a network-specific transaction from an unsigned transaction and an array of provided -signatures. The signed transaction returned from this method will be sent to the -`/construction/submit` endpoint by the caller. - -### Parameters - -| Name | Type | Description | Required | Notes | -| -------------------------------- | --------------------------------------------------------------- | ----------- | ---------- | ----- | -| **construction_combine_request** | [**ConstructionCombineRequest**](ConstructionCombineRequest.md) | | [required] | | - -### Return type - -[**models::ConstructionCombineResponse**](ConstructionCombineResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -## construction_derive - -> models::ConstructionDeriveResponse construction_derive(construction_derive_request) Derive an -> AccountIdentifier from a PublicKey - -Derive returns the AccountIdentifier associated with a public key. Blockchains that require an -on-chain action to create an account should not implement this method. - -### Parameters - -| Name | Type | Description | Required | Notes | -| ------------------------------- | ------------------------------------------------------------- | ----------- | ---------- | ----- | -| **construction_derive_request** | [**ConstructionDeriveRequest**](ConstructionDeriveRequest.md) | | [required] | | - -### Return type - -[**models::ConstructionDeriveResponse**](ConstructionDeriveResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -## construction_hash - -> models::TransactionIdentifierResponse construction_hash(construction_hash_request) Get the Hash of -> a Signed Transaction - -TransactionHash returns the network-specific transaction hash for a signed transaction. - -### Parameters - -| Name | Type | Description | Required | Notes | -| ----------------------------- | --------------------------------------------------------- | ----------- | ---------- | ----- | -| **construction_hash_request** | [**ConstructionHashRequest**](ConstructionHashRequest.md) | | [required] | | - -### Return type - -[**models::TransactionIdentifierResponse**](TransactionIdentifierResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -## construction_metadata - -> models::ConstructionMetadataResponse construction_metadata(construction_metadata_request) Get -> Metadata for Transaction Construction - -Get any information required to construct a transaction for a specific network. Metadata returned -here could be a recent hash to use, an account sequence number, or even arbitrary chain state. The -request used when calling this endpoint is created by calling `/construction/preprocess` in an -offline environment. You should NEVER assume that the request sent to this endpoint will be created -by the caller or populated with any custom parameters. This must occur in -`/construction/preprocess`. It is important to clarify that this endpoint should not pre-construct -any transactions for the client (this should happen in `/construction/payloads`). This endpoint is -left purposely unstructured because of the wide scope of metadata that could be required. - -### Parameters - -| Name | Type | Description | Required | Notes | -| --------------------------------- | ----------------------------------------------------------------- | ----------- | ---------- | ----- | -| **construction_metadata_request** | [**ConstructionMetadataRequest**](ConstructionMetadataRequest.md) | | [required] | | - -### Return type - -[**models::ConstructionMetadataResponse**](ConstructionMetadataResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -## construction_parse - -> models::ConstructionParseResponse construction_parse(construction_parse_request) Parse a -> Transaction - -Parse is called on both unsigned and signed transactions to understand the intent of the formulated -transaction. This is run as a sanity check before signing (after `/construction/payloads`) and -before broadcast (after `/construction/combine`). - -### Parameters - -| Name | Type | Description | Required | Notes | -| ------------------------------ | ----------------------------------------------------------- | ----------- | ---------- | ----- | -| **construction_parse_request** | [**ConstructionParseRequest**](ConstructionParseRequest.md) | | [required] | | - -### Return type - -[**models::ConstructionParseResponse**](ConstructionParseResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -## construction_payloads - -> models::ConstructionPayloadsResponse construction_payloads(construction_payloads_request) Generate -> an Unsigned Transaction and Signing Payloads - -Payloads is called with an array of operations and the response from `/construction/metadata`. It -returns an unsigned transaction blob and a collection of payloads that must be signed by particular -AccountIdentifiers using a certain SignatureType. The array of operations provided in transaction -construction often times can not specify all \"effects\" of a transaction (consider invoked -transactions in Ethereum). However, they can deterministically specify the \"intent\" of the -transaction, which is sufficient for construction. For this reason, parsing the corresponding -transaction in the Data API (when it lands on chain) will contain a superset of whatever operations -were provided during construction. - -### Parameters - -| Name | Type | Description | Required | Notes | -| --------------------------------- | ----------------------------------------------------------------- | ----------- | ---------- | ----- | -| **construction_payloads_request** | [**ConstructionPayloadsRequest**](ConstructionPayloadsRequest.md) | | [required] | | - -### Return type - -[**models::ConstructionPayloadsResponse**](ConstructionPayloadsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -## construction_preprocess - -> models::ConstructionPreprocessResponse construction_preprocess(construction_preprocess_request) -> Create a Request to Fetch Metadata - -Preprocess is called prior to `/construction/payloads` to construct a request for any metadata that -is needed for transaction construction given (i.e. account nonce). The `options` object returned -from this endpoint will be sent to the `/construction/metadata` endpoint UNMODIFIED by the caller -(in an offline execution environment). If your Construction API implementation has configuration -options, they MUST be specified in the `/construction/preprocess` request (in the `metadata` field). - -### Parameters - -| Name | Type | Description | Required | Notes | -| ----------------------------------- | --------------------------------------------------------------------- | ----------- | ---------- | ----- | -| **construction_preprocess_request** | [**ConstructionPreprocessRequest**](ConstructionPreprocessRequest.md) | | [required] | | - -### Return type - -[**models::ConstructionPreprocessResponse**](ConstructionPreprocessResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -## construction_submit - -> models::TransactionIdentifierResponse construction_submit(construction_submit_request) Submit a -> Signed Transaction - -Submit a pre-signed transaction to the node. This call should not block on the transaction being -included in a block. Rather, it should return immediately with an indication of whether or not the -transaction was included in the mempool. The transaction submission response should only return a -200 status if the submitted transaction could be included in the mempool. Otherwise, it should -return an error. - -### Parameters - -| Name | Type | Description | Required | Notes | -| ------------------------------- | ------------------------------------------------------------- | ----------- | ---------- | ----- | -| **construction_submit_request** | [**ConstructionSubmitRequest**](ConstructionSubmitRequest.md) | | [required] | | - -### Return type - -[**models::TransactionIdentifierResponse**](TransactionIdentifierResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionCombineRequest.md b/mesh_generated/docs/ConstructionCombineRequest.md deleted file mode 100644 index e7ac84c..0000000 --- a/mesh_generated/docs/ConstructionCombineRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ConstructionCombineRequest - -## Properties - -| Name | Type | Description | Notes | -| ------------------------ | ----------------------------------------------------- | ----------- | ----- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **unsigned_transaction** | **String** | | | -| **signatures** | [**Vec**](Signature.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionCombineResponse.md b/mesh_generated/docs/ConstructionCombineResponse.md deleted file mode 100644 index 2f5384b..0000000 --- a/mesh_generated/docs/ConstructionCombineResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# ConstructionCombineResponse - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ---------- | ----------- | ----- | -| **signed_transaction** | **String** | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionDeriveRequest.md b/mesh_generated/docs/ConstructionDeriveRequest.md deleted file mode 100644 index a43f426..0000000 --- a/mesh_generated/docs/ConstructionDeriveRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ConstructionDeriveRequest - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ----------------------------------------------------- | ----------- | ---------- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **public_key** | [**models::PublicKey**](PublicKey.md) | | | -| **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionDeriveResponse.md b/mesh_generated/docs/ConstructionDeriveResponse.md deleted file mode 100644 index aea341a..0000000 --- a/mesh_generated/docs/ConstructionDeriveResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ConstructionDeriveResponse - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ---------- | -| **address** | Option<**String**> | [DEPRECATED by `account_identifier` in `v1.4.4`] Address in network-specific format. | [optional] | -| **account_identifier** | Option<[**models::AccountIdentifier**](AccountIdentifier.md)> | | [optional] | -| **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionHashRequest.md b/mesh_generated/docs/ConstructionHashRequest.md deleted file mode 100644 index 0816ceb..0000000 --- a/mesh_generated/docs/ConstructionHashRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ConstructionHashRequest - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ----------------------------------------------------- | ----------- | ----- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **signed_transaction** | **String** | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionMetadataRequest.md b/mesh_generated/docs/ConstructionMetadataRequest.md deleted file mode 100644 index 774d7e1..0000000 --- a/mesh_generated/docs/ConstructionMetadataRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ConstructionMetadataRequest - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **options** | Option<[**serde_json::Value**](.md)> | Some blockchains require different metadata for different types of transaction construction (ex: delegation versus a transfer). Instead of requiring a blockchain node to return all possible types of metadata for construction (which may require multiple node fetches), the client can populate an options object to limit the metadata returned to only the subset required. | [optional] | -| **public_keys** | Option<[**Vec**](PublicKey.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionMetadataResponse.md b/mesh_generated/docs/ConstructionMetadataResponse.md deleted file mode 100644 index 251d11c..0000000 --- a/mesh_generated/docs/ConstructionMetadataResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ConstructionMetadataResponse - -## Properties - -| Name | Type | Description | Notes | -| ----------------- | -------------------------------------------- | ----------- | ---------- | -| **metadata** | [**serde_json::Value**](.md) | | | -| **suggested_fee** | Option<[**Vec**](Amount.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionParseRequest.md b/mesh_generated/docs/ConstructionParseRequest.md deleted file mode 100644 index f857f04..0000000 --- a/mesh_generated/docs/ConstructionParseRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ConstructionParseRequest - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **signed** | **bool** | Signed is a boolean indicating whether the transaction is signed. | | -| **transaction** | **String** | This must be either the unsigned transaction blob returned by `/construction/payloads` or the signed transaction blob returned by `/construction/combine`. | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionParseResponse.md b/mesh_generated/docs/ConstructionParseResponse.md deleted file mode 100644 index 4db379b..0000000 --- a/mesh_generated/docs/ConstructionParseResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# ConstructionParseResponse - -## Properties - -| Name | Type | Description | Notes | -| ------------------------------ | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **operations** | [**Vec**](Operation.md) | | | -| **signers** | Option<**Vec**> | [DEPRECATED by `account_identifier_signers` in `v1.4.4`] All signers (addresses) of a particular transaction. If the transaction is unsigned, it should be empty. | [optional] | -| **account_identifier_signers** | Option<[**Vec**](AccountIdentifier.md)> | | [optional] | -| **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionPayloadsRequest.md b/mesh_generated/docs/ConstructionPayloadsRequest.md deleted file mode 100644 index e56adb5..0000000 --- a/mesh_generated/docs/ConstructionPayloadsRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# ConstructionPayloadsRequest - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ----------------------------------------------------- | ----------- | ---------- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **operations** | [**Vec**](Operation.md) | | | -| **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] | -| **public_keys** | Option<[**Vec**](PublicKey.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionPayloadsResponse.md b/mesh_generated/docs/ConstructionPayloadsResponse.md deleted file mode 100644 index 55c2ca3..0000000 --- a/mesh_generated/docs/ConstructionPayloadsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ConstructionPayloadsResponse - -## Properties - -| Name | Type | Description | Notes | -| ------------------------ | ---------------------------------------------------- | ----------- | ----- | -| **unsigned_transaction** | **String** | | | -| **payloads** | [**Vec**](SigningPayload.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionPreprocessRequest.md b/mesh_generated/docs/ConstructionPreprocessRequest.md deleted file mode 100644 index c066197..0000000 --- a/mesh_generated/docs/ConstructionPreprocessRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ConstructionPreprocessRequest - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ----------------------------------------------------- | ----------- | ---------- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **operations** | [**Vec**](Operation.md) | | | -| **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionPreprocessResponse.md b/mesh_generated/docs/ConstructionPreprocessResponse.md deleted file mode 100644 index 1a3cd6a..0000000 --- a/mesh_generated/docs/ConstructionPreprocessResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ConstructionPreprocessResponse - -## Properties - -| Name | Type | Description | Notes | -| ------------------------ | ------------------------------------------------------------------ | --------------------------------------------------------------------------------- | ---------- | -| **options** | Option<[**serde_json::Value**](.md)> | The options that will be sent directly to `/construction/metadata` by the caller. | [optional] | -| **required_public_keys** | Option<[**Vec**](AccountIdentifier.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ConstructionSubmitRequest.md b/mesh_generated/docs/ConstructionSubmitRequest.md deleted file mode 100644 index 5750627..0000000 --- a/mesh_generated/docs/ConstructionSubmitRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ConstructionSubmitRequest - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ----------------------------------------------------- | ----------- | ----- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **signed_transaction** | **String** | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/Currency.md b/mesh_generated/docs/Currency.md deleted file mode 100644 index 5a61747..0000000 --- a/mesh_generated/docs/Currency.md +++ /dev/null @@ -1,12 +0,0 @@ -# Currency - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **symbol** | **String** | Canonical symbol associated with a currency. | | -| **decimals** | **i32** | Number of decimal places in the standard unit representation of the amount. For example, BTC has 8 decimals. Note that it is not possible to represent the value of some currency in atomic units that is not base 10. | | -| **metadata** | Option<[**serde_json::Value**](.md)> | Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token. | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/CurveType.md b/mesh_generated/docs/CurveType.md deleted file mode 100644 index 313236b..0000000 --- a/mesh_generated/docs/CurveType.md +++ /dev/null @@ -1,15 +0,0 @@ -# CurveType - -## Enum Variants - -| Name | Value | -| --------------- | ---------------- | -| Secp256k1 | secp256k1 | -| Secp256k1Bip340 | secp256k1_bip340 | -| Secp256r1 | secp256r1 | -| Edwards25519 | edwards25519 | -| Tweedle | tweedle | -| Pallas | pallas | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/Direction.md b/mesh_generated/docs/Direction.md deleted file mode 100644 index a746f2e..0000000 --- a/mesh_generated/docs/Direction.md +++ /dev/null @@ -1,11 +0,0 @@ -# Direction - -## Enum Variants - -| Name | Value | -| -------- | -------- | -| Forward | forward | -| Backward | backward | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/Error.md b/mesh_generated/docs/Error.md deleted file mode 100644 index 4980745..0000000 --- a/mesh_generated/docs/Error.md +++ /dev/null @@ -1,14 +0,0 @@ -# Error - -## Properties - -| Name | Type | Description | Notes | -| --------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **code** | **i32** | Code is a network-specific error code. If desired, this code can be equivalent to an HTTP status code. | | -| **message** | **String** | Message is a network-specific error message. The message MUST NOT change for a given code. In particular, this means that any contextual information should be included in the details field. | | -| **description** | Option<**String**> | Description allows the implementer to optionally provide additional information about an error. In many cases, the content of this field will be a copy-and-paste from existing developer documentation. Description can ONLY be populated with generic information about a particular type of error. It MUST NOT be populated with information about a particular instantiation of an error (use `details` for this). Whereas the content of Error.Message should stay stable across releases, the content of Error.Description will likely change across releases (as implementers improve error documentation). For this reason, the content in this field is not part of any type assertion (unlike Error.Message). | [optional] | -| **retriable** | **bool** | An error is retriable if the same request may succeed if submitted again. | | -| **details** | Option<[**serde_json::Value**](.md)> | Often times it is useful to return context specific to the request that caused the error (i.e. a sample of the stack trace or impacted account) in addition to the standard error message. | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/EventsApi.md b/mesh_generated/docs/EventsApi.md deleted file mode 100644 index ddb0bc1..0000000 --- a/mesh_generated/docs/EventsApi.md +++ /dev/null @@ -1,41 +0,0 @@ -# \EventsApi - -All URIs are relative to _http://localhost_ - -| Method | HTTP request | Description | -| ----------------------------------------------- | ----------------------- | ------------------------------------ | -| [**events_blocks**](EventsApi.md#events_blocks) | **POST** /events/blocks | [INDEXER] Get a range of BlockEvents | - -## events_blocks - -> models::EventsBlocksResponse events_blocks(events_blocks_request) [INDEXER] Get a range of -> BlockEvents - -`/events/blocks` allows the caller to query a sequence of BlockEvents indicating which blocks were -added and removed from storage to reach the current state. Following BlockEvents allows lightweight -clients to update their state without needing to implement their own syncing logic (like finding the -common parent in a reorg). `/events/blocks` is considered an \"indexer\" endpoint and Rosetta -implementations are not required to complete it to adhere to the Rosetta spec. However, any Rosetta -\"indexer\" MUST support this endpoint. - -### Parameters - -| Name | Type | Description | Required | Notes | -| ------------------------- | ------------------------------------------------- | ----------- | ---------- | ----- | -| **events_blocks_request** | [**EventsBlocksRequest**](EventsBlocksRequest.md) | | [required] | | - -### Return type - -[**models::EventsBlocksResponse**](EventsBlocksResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/EventsBlocksRequest.md b/mesh_generated/docs/EventsBlocksRequest.md deleted file mode 100644 index d65cb91..0000000 --- a/mesh_generated/docs/EventsBlocksRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# EventsBlocksRequest - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **offset** | Option<**i64**> | offset is the offset into the event stream to sync events from. If this field is not populated, we return the limit events backwards from tip. If this is set to 0, we start from the beginning. | [optional] | -| **limit** | Option<**i64**> | limit is the maximum number of events to fetch in one call. The implementation may return <= limit events. | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/EventsBlocksResponse.md b/mesh_generated/docs/EventsBlocksResponse.md deleted file mode 100644 index 9a8a00b..0000000 --- a/mesh_generated/docs/EventsBlocksResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# EventsBlocksResponse - -## Properties - -| Name | Type | Description | Notes | -| ---------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| **max_sequence** | **i64** | max_sequence is the maximum available sequence number to fetch. | | -| **events** | [**Vec**](BlockEvent.md) | events is an array of BlockEvents indicating the order to add and remove blocks to maintain a canonical view of blockchain state. Lightweight clients can use this event stream to update state without implementing their own block syncing logic. | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/ExemptionType.md b/mesh_generated/docs/ExemptionType.md deleted file mode 100644 index e25e336..0000000 --- a/mesh_generated/docs/ExemptionType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ExemptionType - -## Enum Variants - -| Name | Value | -| -------------- | ---------------- | -| GreaterOrEqual | greater_or_equal | -| LessOrEqual | less_or_equal | -| Dynamic | dynamic | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/MempoolApi.md b/mesh_generated/docs/MempoolApi.md deleted file mode 100644 index 37d7786..0000000 --- a/mesh_generated/docs/MempoolApi.md +++ /dev/null @@ -1,70 +0,0 @@ -# \MempoolApi - -All URIs are relative to _http://localhost_ - -| Method | HTTP request | Description | -| ------------------------------------------------------------ | ----------------------------- | ---------------------------- | -| [**mempool**](MempoolApi.md#mempool) | **POST** /mempool | Get All Mempool Transactions | -| [**mempool_transaction**](MempoolApi.md#mempool_transaction) | **POST** /mempool/transaction | Get a Mempool Transaction | - -## mempool - -> models::MempoolResponse mempool(network_request) Get All Mempool Transactions - -Get all Transaction Identifiers in the mempool - -### Parameters - -| Name | Type | Description | Required | Notes | -| ------------------- | --------------------------------------- | ----------- | ---------- | ----- | -| **network_request** | [**NetworkRequest**](NetworkRequest.md) | | [required] | | - -### Return type - -[**models::MempoolResponse**](MempoolResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -## mempool_transaction - -> models::MempoolTransactionResponse mempool_transaction(mempool_transaction_request) Get a Mempool -> Transaction - -Get a transaction in the mempool by its Transaction Identifier. This is a separate request than -fetching a block transaction (/block/transaction) because some blockchain nodes need to know that a -transaction query is for something in the mempool instead of a transaction in a block. Transactions -may not be fully parsable until they are in a block (ex: may not be possible to determine the fee to -pay before a transaction is executed). On this endpoint, it is ok that returned transactions are -only estimates of what may actually be included in a block. - -### Parameters - -| Name | Type | Description | Required | Notes | -| ------------------------------- | ------------------------------------------------------------- | ----------- | ---------- | ----- | -| **mempool_transaction_request** | [**MempoolTransactionRequest**](MempoolTransactionRequest.md) | | [required] | | - -### Return type - -[**models::MempoolTransactionResponse**](MempoolTransactionResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/MempoolResponse.md b/mesh_generated/docs/MempoolResponse.md deleted file mode 100644 index a55bc3d..0000000 --- a/mesh_generated/docs/MempoolResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# MempoolResponse - -## Properties - -| Name | Type | Description | Notes | -| --------------------------- | ------------------------------------------------------------------ | ----------- | ----- | -| **transaction_identifiers** | [**Vec**](TransactionIdentifier.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/MempoolTransactionRequest.md b/mesh_generated/docs/MempoolTransactionRequest.md deleted file mode 100644 index ceb771d..0000000 --- a/mesh_generated/docs/MempoolTransactionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# MempoolTransactionRequest - -## Properties - -| Name | Type | Description | Notes | -| -------------------------- | ------------------------------------------------------------- | ----------- | ----- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **transaction_identifier** | [**models::TransactionIdentifier**](TransactionIdentifier.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/MempoolTransactionResponse.md b/mesh_generated/docs/MempoolTransactionResponse.md deleted file mode 100644 index bfa7844..0000000 --- a/mesh_generated/docs/MempoolTransactionResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# MempoolTransactionResponse - -## Properties - -| Name | Type | Description | Notes | -| --------------- | ----------------------------------------- | ----------- | ---------- | -| **transaction** | [**models::Transaction**](Transaction.md) | | | -| **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/MetadataRequest.md b/mesh_generated/docs/MetadataRequest.md deleted file mode 100644 index 6ec91a1..0000000 --- a/mesh_generated/docs/MetadataRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# MetadataRequest - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------------------------------ | ----------- | ---------- | -| **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/NetworkApi.md b/mesh_generated/docs/NetworkApi.md deleted file mode 100644 index 45b1f7c..0000000 --- a/mesh_generated/docs/NetworkApi.md +++ /dev/null @@ -1,97 +0,0 @@ -# \NetworkApi - -All URIs are relative to _http://localhost_ - -| Method | HTTP request | Description | -| ---------------------------------------------------- | ------------------------- | ------------------------------ | -| [**network_list**](NetworkApi.md#network_list) | **POST** /network/list | Get List of Available Networks | -| [**network_options**](NetworkApi.md#network_options) | **POST** /network/options | Get Network Options | -| [**network_status**](NetworkApi.md#network_status) | **POST** /network/status | Get Network Status | - -## network_list - -> models::NetworkListResponse network_list(metadata_request) Get List of Available Networks - -This endpoint returns a list of NetworkIdentifiers that the Rosetta server supports. - -### Parameters - -| Name | Type | Description | Required | Notes | -| -------------------- | ----------------------------------------- | ----------- | ---------- | ----- | -| **metadata_request** | [**MetadataRequest**](MetadataRequest.md) | | [required] | | - -### Return type - -[**models::NetworkListResponse**](NetworkListResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -## network_options - -> models::NetworkOptionsResponse network_options(network_request) Get Network Options - -This endpoint returns the version information and allowed network-specific types for a -NetworkIdentifier. Any NetworkIdentifier returned by /network/list should be accessible here. -Because options are retrievable in the context of a NetworkIdentifier, it is possible to define -unique options for each network. - -### Parameters - -| Name | Type | Description | Required | Notes | -| ------------------- | --------------------------------------- | ----------- | ---------- | ----- | -| **network_request** | [**NetworkRequest**](NetworkRequest.md) | | [required] | | - -### Return type - -[**models::NetworkOptionsResponse**](NetworkOptionsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -## network_status - -> models::NetworkStatusResponse network_status(network_request) Get Network Status - -This endpoint returns the current status of the network requested. Any NetworkIdentifier returned by -/network/list should be accessible here. - -### Parameters - -| Name | Type | Description | Required | Notes | -| ------------------- | --------------------------------------- | ----------- | ---------- | ----- | -| **network_request** | [**NetworkRequest**](NetworkRequest.md) | | [required] | | - -### Return type - -[**models::NetworkStatusResponse**](NetworkStatusResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/NetworkIdentifier.md b/mesh_generated/docs/NetworkIdentifier.md deleted file mode 100644 index a678fcd..0000000 --- a/mesh_generated/docs/NetworkIdentifier.md +++ /dev/null @@ -1,12 +0,0 @@ -# NetworkIdentifier - -## Properties - -| Name | Type | Description | Notes | -| -------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **blockchain** | **String** | | | -| **network** | **String** | If a blockchain has a specific chain-id or network identifier, it should go in this field. It is up to the client to determine which network-specific identifier is mainnet or testnet. | | -| **sub_network_identifier** | Option<[**models::SubNetworkIdentifier**](SubNetworkIdentifier.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/NetworkListResponse.md b/mesh_generated/docs/NetworkListResponse.md deleted file mode 100644 index 9bc4962..0000000 --- a/mesh_generated/docs/NetworkListResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# NetworkListResponse - -## Properties - -| Name | Type | Description | Notes | -| ----------------------- | ---------------------------------------------------------- | ----------- | ----- | -| **network_identifiers** | [**Vec**](NetworkIdentifier.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/NetworkOptionsResponse.md b/mesh_generated/docs/NetworkOptionsResponse.md deleted file mode 100644 index dcaafdf..0000000 --- a/mesh_generated/docs/NetworkOptionsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# NetworkOptionsResponse - -## Properties - -| Name | Type | Description | Notes | -| ----------- | --------------------------------- | ----------- | ----- | -| **version** | [**models::Version**](Version.md) | | | -| **allow** | [**models::Allow**](Allow.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/NetworkRequest.md b/mesh_generated/docs/NetworkRequest.md deleted file mode 100644 index 184b790..0000000 --- a/mesh_generated/docs/NetworkRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# NetworkRequest - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ----------------------------------------------------- | ----------- | ---------- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/NetworkStatusResponse.md b/mesh_generated/docs/NetworkStatusResponse.md deleted file mode 100644 index eaeeeaa..0000000 --- a/mesh_generated/docs/NetworkStatusResponse.md +++ /dev/null @@ -1,15 +0,0 @@ -# NetworkStatusResponse - -## Properties - -| Name | Type | Description | Notes | -| ---------------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **current_block_identifier** | [**models::BlockIdentifier**](BlockIdentifier.md) | | | -| **current_block_timestamp** | **i64** | The timestamp of the block in milliseconds since the Unix Epoch. The timestamp is stored in milliseconds because some blockchains produce blocks more often than once a second. | | -| **genesis_block_identifier** | [**models::BlockIdentifier**](BlockIdentifier.md) | | | -| **oldest_block_identifier** | Option<[**models::BlockIdentifier**](BlockIdentifier.md)> | | [optional] | -| **sync_status** | Option<[**models::SyncStatus**](SyncStatus.md)> | | [optional] | -| **peers** | Option<[**Vec**](Peer.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/Operation.md b/mesh_generated/docs/Operation.md deleted file mode 100644 index 2eabad9..0000000 --- a/mesh_generated/docs/Operation.md +++ /dev/null @@ -1,17 +0,0 @@ -# Operation - -## Properties - -| Name | Type | Description | Notes | -| ------------------------ | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **operation_identifier** | [**models::OperationIdentifier**](OperationIdentifier.md) | | | -| **related_operations** | Option<[**Vec**](OperationIdentifier.md)> | Restrict referenced related_operations to identifier indices < the current operation_identifier.index. This ensures there exists a clear DAG-structure of relations. Since operations are one-sided, one could imagine relating operations in a single transfer or linking operations in a call tree. | [optional] | -| **r#type** | **String** | Type is the network-specific type of the operation. Ensure that any type that can be returned here is also specified in the NetworkOptionsResponse. This can be very useful to downstream consumers that parse all block data. | | -| **status** | Option<**String**> | Status is the network-specific status of the operation. Status is not defined on the transaction object because blockchains with smart contracts may have transactions that partially apply (some operations are successful and some are not). Blockchains with atomic transactions (all operations succeed or all operations fail) will have the same status for each operation. On-chain operations (operations retrieved in the `/block` and `/block/transaction` endpoints) MUST have a populated status field (anything on-chain must have succeeded or failed). However, operations provided during transaction construction (often times called \"intent\" in the documentation) MUST NOT have a populated status field (operations yet to be included on-chain have not yet succeeded or failed). | [optional] | -| **account** | Option<[**models::AccountIdentifier**](AccountIdentifier.md)> | | [optional] | -| **amount** | Option<[**models::Amount**](Amount.md)> | | [optional] | -| **coin_change** | Option<[**models::CoinChange**](CoinChange.md)> | | [optional] | -| **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/OperationIdentifier.md b/mesh_generated/docs/OperationIdentifier.md deleted file mode 100644 index 7a1acd0..0000000 --- a/mesh_generated/docs/OperationIdentifier.md +++ /dev/null @@ -1,11 +0,0 @@ -# OperationIdentifier - -## Properties - -| Name | Type | Description | Notes | -| ----------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **index** | **i64** | The operation index is used to ensure each operation has a unique identifier within a transaction. This index is only relative to the transaction and NOT GLOBAL. The operations in each transaction should start from index 0. To clarify, there may not be any notion of an operation index in the blockchain being described. | | -| **network_index** | Option<**i64**> | Some blockchains specify an operation index that is essential for client use. For example, Bitcoin uses a network_index to identify which UTXO was used in a transaction. network_index should not be populated if there is no notion of an operation index in a blockchain (typically most account-based blockchains). | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/OperationStatus.md b/mesh_generated/docs/OperationStatus.md deleted file mode 100644 index 3b95249..0000000 --- a/mesh_generated/docs/OperationStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# OperationStatus - -## Properties - -| Name | Type | Description | Notes | -| -------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| **status** | **String** | The status is the network-specific status of the operation. | | -| **successful** | **bool** | An Operation is considered successful if the Operation.Amount should affect the Operation.Account. Some blockchains (like Bitcoin) only include successful operations in blocks but other blockchains (like Ethereum) include unsuccessful operations that incur a fee. To reconcile the computed balance from the stream of Operations, it is critical to understand which Operation.Status indicate an Operation is successful and should affect an Account. | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/Operator.md b/mesh_generated/docs/Operator.md deleted file mode 100644 index 0978e49..0000000 --- a/mesh_generated/docs/Operator.md +++ /dev/null @@ -1,11 +0,0 @@ -# Operator - -## Enum Variants - -| Name | Value | -| ---- | ----- | -| Or | or | -| And | and | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/PartialBlockIdentifier.md b/mesh_generated/docs/PartialBlockIdentifier.md deleted file mode 100644 index fb81016..0000000 --- a/mesh_generated/docs/PartialBlockIdentifier.md +++ /dev/null @@ -1,11 +0,0 @@ -# PartialBlockIdentifier - -## Properties - -| Name | Type | Description | Notes | -| --------- | ------------------ | ----------- | ---------- | -| **index** | Option<**i64**> | | [optional] | -| **hash** | Option<**String**> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/Peer.md b/mesh_generated/docs/Peer.md deleted file mode 100644 index b2765b6..0000000 --- a/mesh_generated/docs/Peer.md +++ /dev/null @@ -1,11 +0,0 @@ -# Peer - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------------------------------ | ----------- | ---------- | -| **peer_id** | **String** | | | -| **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/PublicKey.md b/mesh_generated/docs/PublicKey.md deleted file mode 100644 index e64d537..0000000 --- a/mesh_generated/docs/PublicKey.md +++ /dev/null @@ -1,11 +0,0 @@ -# PublicKey - -## Properties - -| Name | Type | Description | Notes | -| -------------- | ------------------------------------- | ---------------------------------------------------------------------- | ----- | -| **hex_bytes** | **String** | Hex-encoded public key bytes in the format specified by the CurveType. | | -| **curve_type** | [**models::CurveType**](CurveType.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/RelatedTransaction.md b/mesh_generated/docs/RelatedTransaction.md deleted file mode 100644 index c8a5303..0000000 --- a/mesh_generated/docs/RelatedTransaction.md +++ /dev/null @@ -1,12 +0,0 @@ -# RelatedTransaction - -## Properties - -| Name | Type | Description | Notes | -| -------------------------- | ------------------------------------------------------------- | ----------- | ---------- | -| **network_identifier** | Option<[**models::NetworkIdentifier**](NetworkIdentifier.md)> | | [optional] | -| **transaction_identifier** | [**models::TransactionIdentifier**](TransactionIdentifier.md) | | | -| **direction** | [**models::Direction**](Direction.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/SearchApi.md b/mesh_generated/docs/SearchApi.md deleted file mode 100644 index 6e47190..0000000 --- a/mesh_generated/docs/SearchApi.md +++ /dev/null @@ -1,40 +0,0 @@ -# \SearchApi - -All URIs are relative to _http://localhost_ - -| Method | HTTP request | Description | -| ----------------------------------------------------------- | ----------------------------- | --------------------------------- | -| [**search_transactions**](SearchApi.md#search_transactions) | **POST** /search/transactions | [INDEXER] Search for Transactions | - -## search_transactions - -> models::SearchTransactionsResponse search_transactions(search_transactions_request) [INDEXER] -> Search for Transactions - -`/search/transactions` allows the caller to search for transactions that meet certain conditions. -Some conditions include matching a transaction hash, containing an operation with a certain status, -or containing an operation that affects a certain account. `/search/transactions` is considered an -\"indexer\" endpoint and Rosetta implementations are not required to complete it to adhere to the -Rosetta spec. However, any Rosetta \"indexer\" MUST support this endpoint. - -### Parameters - -| Name | Type | Description | Required | Notes | -| ------------------------------- | ------------------------------------------------------------- | ----------- | ---------- | ----- | -| **search_transactions_request** | [**SearchTransactionsRequest**](SearchTransactionsRequest.md) | | [required] | | - -### Return type - -[**models::SearchTransactionsResponse**](SearchTransactionsResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/SearchTransactionsRequest.md b/mesh_generated/docs/SearchTransactionsRequest.md deleted file mode 100644 index 505e0b3..0000000 --- a/mesh_generated/docs/SearchTransactionsRequest.md +++ /dev/null @@ -1,22 +0,0 @@ -# SearchTransactionsRequest - -## Properties - -| Name | Type | Description | Notes | -| -------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **network_identifier** | [**models::NetworkIdentifier**](NetworkIdentifier.md) | | | -| **operator** | Option<[**models::Operator**](Operator.md)> | | [optional] | -| **max_block** | Option<**i64**> | max_block is the largest block index to consider when searching for transactions. If this field is not populated, the current block is considered the max_block. If you do not specify a max_block, it is possible a newly synced block will interfere with paginated transaction queries (as the offset could become invalid with newly added rows). | [optional] | -| **offset** | Option<**i64**> | offset is the offset into the query result to start returning transactions. If any search conditions are changed, the query offset will change and you must restart your search iteration. | [optional] | -| **limit** | Option<**i64**> | limit is the maximum number of transactions to return in one call. The implementation may return <= limit transactions. | [optional] | -| **transaction_identifier** | Option<[**models::TransactionIdentifier**](TransactionIdentifier.md)> | | [optional] | -| **account_identifier** | Option<[**models::AccountIdentifier**](AccountIdentifier.md)> | | [optional] | -| **coin_identifier** | Option<[**models::CoinIdentifier**](CoinIdentifier.md)> | | [optional] | -| **currency** | Option<[**models::Currency**](Currency.md)> | | [optional] | -| **status** | Option<**String**> | status is the network-specific operation type. | [optional] | -| **r#type** | Option<**String**> | type is the network-specific operation type. | [optional] | -| **address** | Option<**String**> | address is AccountIdentifier.Address. This is used to get all transactions related to an AccountIdentifier.Address, regardless of SubAccountIdentifier. | [optional] | -| **success** | Option<**bool**> | success is a synthetic condition populated by parsing network-specific operation statuses (using the mapping provided in `/network/options`). | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/SearchTransactionsResponse.md b/mesh_generated/docs/SearchTransactionsResponse.md deleted file mode 100644 index 59cbf96..0000000 --- a/mesh_generated/docs/SearchTransactionsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchTransactionsResponse - -## Properties - -| Name | Type | Description | Notes | -| ---------------- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **transactions** | [**Vec**](BlockTransaction.md) | transactions is an array of BlockTransactions sorted by most recent BlockIdentifier (meaning that transactions in recent blocks appear first). If there are many transactions for a particular search, transactions may not contain all matching transactions. It is up to the caller to paginate these transactions using the max_block field. | | -| **total_count** | **i64** | total_count is the number of results for a given search. Callers typically use this value to concurrently fetch results by offset or to display a virtual page number associated with results. | | -| **next_offset** | Option<**i64**> | next_offset is the next offset to use when paginating through transaction results. If this field is not populated, there are no more transactions to query. | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/Signature.md b/mesh_generated/docs/Signature.md deleted file mode 100644 index b463095..0000000 --- a/mesh_generated/docs/Signature.md +++ /dev/null @@ -1,13 +0,0 @@ -# Signature - -## Properties - -| Name | Type | Description | Notes | -| ------------------- | ----------------------------------------------- | ----------- | ----- | -| **signing_payload** | [**models::SigningPayload**](SigningPayload.md) | | | -| **public_key** | [**models::PublicKey**](PublicKey.md) | | | -| **signature_type** | [**models::SignatureType**](SignatureType.md) | | | -| **hex_bytes** | **String** | | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/SignatureType.md b/mesh_generated/docs/SignatureType.md deleted file mode 100644 index d25b150..0000000 --- a/mesh_generated/docs/SignatureType.md +++ /dev/null @@ -1,15 +0,0 @@ -# SignatureType - -## Enum Variants - -| Name | Value | -| --------------- | ---------------- | -| Ecdsa | ecdsa | -| EcdsaRecovery | ecdsa_recovery | -| Ed25519 | ed25519 | -| Schnorr1 | schnorr_1 | -| SchnorrBip340 | schnorr_bip340 | -| SchnorrPoseidon | schnorr_poseidon | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/SigningPayload.md b/mesh_generated/docs/SigningPayload.md deleted file mode 100644 index eda5f6d..0000000 --- a/mesh_generated/docs/SigningPayload.md +++ /dev/null @@ -1,13 +0,0 @@ -# SigningPayload - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **address** | Option<**String**> | [DEPRECATED by `account_identifier` in `v1.4.4`] The network-specific address of the account that should sign the payload. | [optional] | -| **account_identifier** | Option<[**models::AccountIdentifier**](AccountIdentifier.md)> | | [optional] | -| **hex_bytes** | **String** | Hex-encoded string of the payload bytes. | | -| **signature_type** | Option<[**models::SignatureType**](SignatureType.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/SubAccountIdentifier.md b/mesh_generated/docs/SubAccountIdentifier.md deleted file mode 100644 index 1ce9597..0000000 --- a/mesh_generated/docs/SubAccountIdentifier.md +++ /dev/null @@ -1,11 +0,0 @@ -# SubAccountIdentifier - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **address** | **String** | The SubAccount address may be a cryptographic value or some other identifier (ex: bonded) that uniquely specifies a SubAccount. | | -| **metadata** | Option<[**serde_json::Value**](.md)> | If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients. | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/SubNetworkIdentifier.md b/mesh_generated/docs/SubNetworkIdentifier.md deleted file mode 100644 index 2ffc361..0000000 --- a/mesh_generated/docs/SubNetworkIdentifier.md +++ /dev/null @@ -1,11 +0,0 @@ -# SubNetworkIdentifier - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------------------------------ | ----------- | ---------- | -| **network** | **String** | | | -| **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/SyncStatus.md b/mesh_generated/docs/SyncStatus.md deleted file mode 100644 index bec8ded..0000000 --- a/mesh_generated/docs/SyncStatus.md +++ /dev/null @@ -1,13 +0,0 @@ -# SyncStatus - -## Properties - -| Name | Type | Description | Notes | -| ----------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **current_index** | Option<**i64**> | CurrentIndex is the index of the last synced block in the current stage. This is a separate field from current_block_identifier in NetworkStatusResponse because blocks with indices up to and including the current_index may not yet be queryable by the caller. To reiterate, all indices up to and including current_block_identifier in NetworkStatusResponse must be queryable via the /block endpoint (excluding indices less than oldest_block_identifier). | [optional] | -| **target_index** | Option<**i64**> | TargetIndex is the index of the block that the implementation is attempting to sync to in the current stage. | [optional] | -| **stage** | Option<**String**> | Stage is the phase of the sync process. | [optional] | -| **synced** | Option<**bool**> | synced is a boolean that indicates if an implementation has synced up to the most recent block. If this field is not populated, the caller should rely on a traditional tip timestamp comparison to determine if an implementation is synced. This field is particularly useful for quiescent blockchains (blocks only produced when there are pending transactions). In these blockchains, the most recent block could have a timestamp far behind the current time but the node could be healthy and at tip. | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/Transaction.md b/mesh_generated/docs/Transaction.md deleted file mode 100644 index 77dabee..0000000 --- a/mesh_generated/docs/Transaction.md +++ /dev/null @@ -1,13 +0,0 @@ -# Transaction - -## Properties - -| Name | Type | Description | Notes | -| -------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **transaction_identifier** | [**models::TransactionIdentifier**](TransactionIdentifier.md) | | | -| **operations** | [**Vec**](Operation.md) | | | -| **related_transactions** | Option<[**Vec**](RelatedTransaction.md)> | | [optional] | -| **metadata** | Option<[**serde_json::Value**](.md)> | Transactions that are related to other transactions (like a cross-shard transaction) should include the tranaction_identifier of these transactions in the metadata. | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/TransactionIdentifier.md b/mesh_generated/docs/TransactionIdentifier.md deleted file mode 100644 index 17edc36..0000000 --- a/mesh_generated/docs/TransactionIdentifier.md +++ /dev/null @@ -1,10 +0,0 @@ -# TransactionIdentifier - -## Properties - -| Name | Type | Description | Notes | -| -------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| **hash** | **String** | Any transactions that are attributable only to a block (ex: a block event) should use the hash of the block as the identifier. This should be normalized according to the case specified in the transaction_hash_case in network options. | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/TransactionIdentifierResponse.md b/mesh_generated/docs/TransactionIdentifierResponse.md deleted file mode 100644 index b46f9ac..0000000 --- a/mesh_generated/docs/TransactionIdentifierResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# TransactionIdentifierResponse - -## Properties - -| Name | Type | Description | Notes | -| -------------------------- | ------------------------------------------------------------- | ----------- | ---------- | -| **transaction_identifier** | [**models::TransactionIdentifier**](TransactionIdentifier.md) | | | -| **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/docs/Version.md b/mesh_generated/docs/Version.md deleted file mode 100644 index 55ae0aa..0000000 --- a/mesh_generated/docs/Version.md +++ /dev/null @@ -1,13 +0,0 @@ -# Version - -## Properties - -| Name | Type | Description | Notes | -| ---------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **rosetta_version** | **String** | The rosetta_version is the version of the Rosetta interface the implementation adheres to. This can be useful for clients looking to reliably parse responses. | | -| **node_version** | **String** | The node_version is the canonical version of the node runtime. This can help clients manage deployments. | | -| **middleware_version** | Option<**String**> | When a middleware server is used to adhere to the Rosetta interface, it should return its version here. This can help clients manage deployments. | [optional] | -| **metadata** | Option<[**serde_json::Value**](.md)> | Any other information that may be useful about versioning of dependent services should be returned here. | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mesh_generated/git_push.sh b/mesh_generated/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/mesh_generated/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/mesh_generated/src/apis/account_api.rs b/mesh_generated/src/apis/account_api.rs deleted file mode 100644 index 4fd0b8e..0000000 --- a/mesh_generated/src/apis/account_api.rs +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use super::configuration; -use super::Error; -use crate::apis::ResponseContent; -use crate::models; -use reqwest; -use serde::Deserialize; -use serde::Serialize; - -/// struct for typed errors of method [`account_balance`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AccountBalanceError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`account_coins`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AccountCoinsError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// Get an array of all AccountBalances for an AccountIdentifier and the BlockIdentifier at which the balance lookup was performed. The BlockIdentifier must always be returned because some consumers of account balance data need to know specifically at which block the balance was calculated to compare balances they compute from operations with the balance returned by the node. It is important to note that making a balance request for an account without populating the SubAccountIdentifier should not result in the balance of all possible SubAccountIdentifiers being returned. Rather, it should result in the balance pertaining to no SubAccountIdentifiers being returned (sometimes called the liquid balance). To get all balances associated with an account, it may be necessary to perform multiple balance requests with unique AccountIdentifiers. It is also possible to perform a historical balance lookup (if the server supports it) by passing in an optional BlockIdentifier. -pub async fn account_balance( - configuration: &configuration::Configuration, - account_balance_request: models::AccountBalanceRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/account/balance", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&account_balance_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Get an array of all unspent coins for an AccountIdentifier and the BlockIdentifier at which the lookup was performed. If your implementation does not support coins (i.e. it is for an account-based blockchain), you do not need to implement this endpoint. If you implementation does support coins (i.e. it is fro a UTXO-based blockchain), you MUST also complete the `/account/balance` endpoint. It is important to note that making a coins request for an account without populating the SubAccountIdentifier should not result in the coins of all possible SubAccountIdentifiers being returned. Rather, it should result in the coins pertaining to no SubAccountIdentifiers being returned. To get all coins associated with an account, it may be necessary to perform multiple coin requests with unique AccountIdentifiers. Optionally, an implementation may choose to support updating an AccountIdentifier's unspent coins based on the contents of the mempool. Note, using this functionality breaks any guarantee of idempotency. -pub async fn account_coins( - configuration: &configuration::Configuration, - account_coins_request: models::AccountCoinsRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/account/coins", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&account_coins_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} diff --git a/mesh_generated/src/apis/block_api.rs b/mesh_generated/src/apis/block_api.rs deleted file mode 100644 index 93339d8..0000000 --- a/mesh_generated/src/apis/block_api.rs +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use super::configuration; -use super::Error; -use crate::apis::ResponseContent; -use crate::models; -use reqwest; -use serde::Deserialize; -use serde::Serialize; - -/// struct for typed errors of method [`block`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BlockError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`block_transaction`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BlockTransactionError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// Get a block by its Block Identifier. If transactions are returned in the same call to the node as fetching the block, the response should include these transactions in the Block object. If not, an array of Transaction Identifiers should be returned so /block/transaction fetches can be done to get all transaction information. When requesting a block by the hash component of the BlockIdentifier, this request MUST be idempotent: repeated invocations for the same hash-identified block must return the exact same block contents. No such restriction is imposed when requesting a block by height, given that a chain reorg event might cause the specific block at height `n` to be set to a different one. -pub async fn block( - configuration: &configuration::Configuration, - block_request: models::BlockRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/block", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&block_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Get a transaction in a block by its Transaction Identifier. This endpoint should only be used when querying a node for a block does not return all transactions contained within it. All transactions returned by this endpoint must be appended to any transactions returned by the /block method by consumers of this data. Fetching a transaction by hash is considered an Explorer Method (which is classified under the Future Work section). This method can be used to let consumers to paginate results when the block trasactions count is too big to be returned in a single BlockResponse. Calling this endpoint requires reference to a BlockIdentifier because transaction parsing can change depending on which block contains the transaction. For example, in Bitcoin it is necessary to know which block contains a transaction to determine the destination of fee payments. Without specifying a block identifier, the node would have to infer which block to use (which could change during a re-org). Implementations that require fetching previous transactions to populate the response (ex: Previous UTXOs in Bitcoin) may find it useful to run a cache within the Rosetta server in the /data directory (on a path that does not conflict with the node). -pub async fn block_transaction( - configuration: &configuration::Configuration, - block_transaction_request: models::BlockTransactionRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/block/transaction", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&block_transaction_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} diff --git a/mesh_generated/src/apis/call_api.rs b/mesh_generated/src/apis/call_api.rs deleted file mode 100644 index febdfa7..0000000 --- a/mesh_generated/src/apis/call_api.rs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use super::configuration; -use super::Error; -use crate::apis::ResponseContent; -use crate::models; -use reqwest; -use serde::Deserialize; -use serde::Serialize; - -/// struct for typed errors of method [`call`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CallError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// Call invokes an arbitrary, network-specific procedure call with network-specific parameters. The guidance for what this endpoint should or could do is purposely left vague. In Ethereum, this could be used to invoke `eth_call` to implement an entire Rosetta API interface for some smart contract that is not parsed by the implementation creator (like a DEX). This endpoint could also be used to provide access to data that does not map to any Rosetta models instead of requiring an integrator to use some network-specific SDK and call some network-specific endpoint (like surfacing staking parameters). Call is NOT a replacement for implementing Rosetta API endpoints or mapping network-specific data to Rosetta models. Rather, it enables developers to build additional Rosetta API interfaces for things they care about without introducing complexity into a base-level Rosetta implementation. Simply put, imagine that the average integrator will use layered Rosetta API implementations that each surfaces unique data. -pub async fn call( - configuration: &configuration::Configuration, - call_request: models::CallRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/call", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&call_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} diff --git a/mesh_generated/src/apis/configuration.rs b/mesh_generated/src/apis/configuration.rs deleted file mode 100644 index 12353dd..0000000 --- a/mesh_generated/src/apis/configuration.rs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Debug, Clone)] -pub struct Configuration { - pub base_path: String, - pub user_agent: Option, - pub client: reqwest::Client, - pub basic_auth: Option, - pub oauth_access_token: Option, - pub bearer_access_token: Option, - pub api_key: Option, - // TODO: take an oauth2 token source, similar to the go one -} - -pub type BasicAuth = (String, Option); - -#[derive(Debug, Clone)] -pub struct ApiKey { - pub prefix: Option, - pub key: String, -} - -impl Configuration { - pub fn new() -> Configuration { - Configuration::default() - } -} - -impl Default for Configuration { - fn default() -> Self { - Configuration { - base_path: "http://localhost".to_owned(), - user_agent: Some("OpenAPI-Generator/1.4.13/rust".to_owned()), - client: reqwest::Client::new(), - basic_auth: None, - oauth_access_token: None, - bearer_access_token: None, - api_key: None, - } - } -} diff --git a/mesh_generated/src/apis/construction_api.rs b/mesh_generated/src/apis/construction_api.rs deleted file mode 100644 index cdced2f..0000000 --- a/mesh_generated/src/apis/construction_api.rs +++ /dev/null @@ -1,369 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use super::configuration; -use super::Error; -use crate::apis::ResponseContent; -use crate::models; -use reqwest; -use serde::Deserialize; -use serde::Serialize; - -/// struct for typed errors of method [`construction_combine`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ConstructionCombineError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`construction_derive`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ConstructionDeriveError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`construction_hash`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ConstructionHashError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`construction_metadata`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ConstructionMetadataError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`construction_parse`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ConstructionParseError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`construction_payloads`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ConstructionPayloadsError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`construction_preprocess`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ConstructionPreprocessError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`construction_submit`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ConstructionSubmitError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// Combine creates a network-specific transaction from an unsigned transaction and an array of provided signatures. The signed transaction returned from this method will be sent to the `/construction/submit` endpoint by the caller. -pub async fn construction_combine( - configuration: &configuration::Configuration, - construction_combine_request: models::ConstructionCombineRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/construction/combine", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&construction_combine_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Derive returns the AccountIdentifier associated with a public key. Blockchains that require an on-chain action to create an account should not implement this method. -pub async fn construction_derive( - configuration: &configuration::Configuration, - construction_derive_request: models::ConstructionDeriveRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/construction/derive", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&construction_derive_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// TransactionHash returns the network-specific transaction hash for a signed transaction. -pub async fn construction_hash( - configuration: &configuration::Configuration, - construction_hash_request: models::ConstructionHashRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/construction/hash", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&construction_hash_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Get any information required to construct a transaction for a specific network. Metadata returned here could be a recent hash to use, an account sequence number, or even arbitrary chain state. The request used when calling this endpoint is created by calling `/construction/preprocess` in an offline environment. You should NEVER assume that the request sent to this endpoint will be created by the caller or populated with any custom parameters. This must occur in `/construction/preprocess`. It is important to clarify that this endpoint should not pre-construct any transactions for the client (this should happen in `/construction/payloads`). This endpoint is left purposely unstructured because of the wide scope of metadata that could be required. -pub async fn construction_metadata( - configuration: &configuration::Configuration, - construction_metadata_request: models::ConstructionMetadataRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/construction/metadata", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&construction_metadata_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Parse is called on both unsigned and signed transactions to understand the intent of the formulated transaction. This is run as a sanity check before signing (after `/construction/payloads`) and before broadcast (after `/construction/combine`). -pub async fn construction_parse( - configuration: &configuration::Configuration, - construction_parse_request: models::ConstructionParseRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/construction/parse", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&construction_parse_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Payloads is called with an array of operations and the response from `/construction/metadata`. It returns an unsigned transaction blob and a collection of payloads that must be signed by particular AccountIdentifiers using a certain SignatureType. The array of operations provided in transaction construction often times can not specify all \"effects\" of a transaction (consider invoked transactions in Ethereum). However, they can deterministically specify the \"intent\" of the transaction, which is sufficient for construction. For this reason, parsing the corresponding transaction in the Data API (when it lands on chain) will contain a superset of whatever operations were provided during construction. -pub async fn construction_payloads( - configuration: &configuration::Configuration, - construction_payloads_request: models::ConstructionPayloadsRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/construction/payloads", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&construction_payloads_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Preprocess is called prior to `/construction/payloads` to construct a request for any metadata that is needed for transaction construction given (i.e. account nonce). The `options` object returned from this endpoint will be sent to the `/construction/metadata` endpoint UNMODIFIED by the caller (in an offline execution environment). If your Construction API implementation has configuration options, they MUST be specified in the `/construction/preprocess` request (in the `metadata` field). -pub async fn construction_preprocess( - configuration: &configuration::Configuration, - construction_preprocess_request: models::ConstructionPreprocessRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/construction/preprocess", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&construction_preprocess_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Submit a pre-signed transaction to the node. This call should not block on the transaction being included in a block. Rather, it should return immediately with an indication of whether or not the transaction was included in the mempool. The transaction submission response should only return a 200 status if the submitted transaction could be included in the mempool. Otherwise, it should return an error. -pub async fn construction_submit( - configuration: &configuration::Configuration, - construction_submit_request: models::ConstructionSubmitRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/construction/submit", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&construction_submit_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} diff --git a/mesh_generated/src/apis/events_api.rs b/mesh_generated/src/apis/events_api.rs deleted file mode 100644 index 5ecc8a0..0000000 --- a/mesh_generated/src/apis/events_api.rs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use super::configuration; -use super::Error; -use crate::apis::ResponseContent; -use crate::models; -use reqwest; -use serde::Deserialize; -use serde::Serialize; - -/// struct for typed errors of method [`events_blocks`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum EventsBlocksError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// `/events/blocks` allows the caller to query a sequence of BlockEvents indicating which blocks were added and removed from storage to reach the current state. Following BlockEvents allows lightweight clients to update their state without needing to implement their own syncing logic (like finding the common parent in a reorg). `/events/blocks` is considered an \"indexer\" endpoint and Rosetta implementations are not required to complete it to adhere to the Rosetta spec. However, any Rosetta \"indexer\" MUST support this endpoint. -pub async fn events_blocks( - configuration: &configuration::Configuration, - events_blocks_request: models::EventsBlocksRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/events/blocks", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&events_blocks_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} diff --git a/mesh_generated/src/apis/mempool_api.rs b/mesh_generated/src/apis/mempool_api.rs deleted file mode 100644 index cbad70e..0000000 --- a/mesh_generated/src/apis/mempool_api.rs +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use super::configuration; -use super::Error; -use crate::apis::ResponseContent; -use crate::models; -use reqwest; -use serde::Deserialize; -use serde::Serialize; - -/// struct for typed errors of method [`mempool`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum MempoolError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`mempool_transaction`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum MempoolTransactionError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// Get all Transaction Identifiers in the mempool -pub async fn mempool( - configuration: &configuration::Configuration, - network_request: models::NetworkRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/mempool", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&network_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Get a transaction in the mempool by its Transaction Identifier. This is a separate request than fetching a block transaction (/block/transaction) because some blockchain nodes need to know that a transaction query is for something in the mempool instead of a transaction in a block. Transactions may not be fully parsable until they are in a block (ex: may not be possible to determine the fee to pay before a transaction is executed). On this endpoint, it is ok that returned transactions are only estimates of what may actually be included in a block. -pub async fn mempool_transaction( - configuration: &configuration::Configuration, - mempool_transaction_request: models::MempoolTransactionRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/mempool/transaction", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&mempool_transaction_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} diff --git a/mesh_generated/src/apis/mod.rs b/mesh_generated/src/apis/mod.rs deleted file mode 100644 index b486256..0000000 --- a/mesh_generated/src/apis/mod.rs +++ /dev/null @@ -1,96 +0,0 @@ -use std::error; -use std::fmt; - -#[derive(Debug, Clone)] -pub struct ResponseContent { - pub status: reqwest::StatusCode, - pub content: String, - pub entity: Option, -} - -#[derive(Debug)] -pub enum Error { - Reqwest(reqwest::Error), - Serde(serde_json::Error), - Io(std::io::Error), - ResponseError(ResponseContent), -} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let (module, e) = match self { - Error::Reqwest(e) => ("reqwest", e.to_string()), - Error::Serde(e) => ("serde", e.to_string()), - Error::Io(e) => ("IO", e.to_string()), - Error::ResponseError(e) => ("response", format!("status code {}", e.status)), - }; - write!(f, "error in {}: {}", module, e) - } -} - -impl error::Error for Error { - fn source(&self) -> Option<&(dyn error::Error + 'static)> { - Some(match self { - Error::Reqwest(e) => e, - Error::Serde(e) => e, - Error::Io(e) => e, - Error::ResponseError(_) => return None, - }) - } -} - -impl From for Error { - fn from(e: reqwest::Error) -> Self { - Error::Reqwest(e) - } -} - -impl From for Error { - fn from(e: serde_json::Error) -> Self { - Error::Serde(e) - } -} - -impl From for Error { - fn from(e: std::io::Error) -> Self { - Error::Io(e) - } -} - -pub fn urlencode>(s: T) -> String { - ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() -} - -pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { - if let serde_json::Value::Object(object) = value { - let mut params = vec![]; - - for (key, value) in object { - match value { - serde_json::Value::Object(_) => params.append(&mut parse_deep_object(&format!("{}[{}]", prefix, key), value)), - serde_json::Value::Array(array) => { - for (i, value) in array.iter().enumerate() { - params.append(&mut parse_deep_object(&format!("{}[{}][{}]", prefix, key, i), value)); - } - } - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), - _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), - } - } - - return params; - } - - unimplemented!("Only objects are supported with style=deepObject") -} - -pub mod account_api; -pub mod block_api; -pub mod call_api; -pub mod construction_api; -pub mod events_api; -pub mod mempool_api; -pub mod network_api; -pub mod search_api; - -pub mod configuration; diff --git a/mesh_generated/src/apis/network_api.rs b/mesh_generated/src/apis/network_api.rs deleted file mode 100644 index 1c4a633..0000000 --- a/mesh_generated/src/apis/network_api.rs +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use super::configuration; -use super::Error; -use crate::apis::ResponseContent; -use crate::models; -use reqwest; -use serde::Deserialize; -use serde::Serialize; - -/// struct for typed errors of method [`network_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum NetworkListError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`network_options`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum NetworkOptionsError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`network_status`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum NetworkStatusError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// This endpoint returns a list of NetworkIdentifiers that the Rosetta server supports. -pub async fn network_list( - configuration: &configuration::Configuration, - metadata_request: models::MetadataRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/network/list", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&metadata_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint returns the version information and allowed network-specific types for a NetworkIdentifier. Any NetworkIdentifier returned by /network/list should be accessible here. Because options are retrievable in the context of a NetworkIdentifier, it is possible to define unique options for each network. -pub async fn network_options( - configuration: &configuration::Configuration, - network_request: models::NetworkRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/network/options", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&network_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint returns the current status of the network requested. Any NetworkIdentifier returned by /network/list should be accessible here. -pub async fn network_status( - configuration: &configuration::Configuration, - network_request: models::NetworkRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/network/status", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&network_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} diff --git a/mesh_generated/src/apis/search_api.rs b/mesh_generated/src/apis/search_api.rs deleted file mode 100644 index 37368b6..0000000 --- a/mesh_generated/src/apis/search_api.rs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use super::configuration; -use super::Error; -use crate::apis::ResponseContent; -use crate::models; -use reqwest; -use serde::Deserialize; -use serde::Serialize; - -/// struct for typed errors of method [`search_transactions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SearchTransactionsError { - Status500(models::Error), - UnknownValue(serde_json::Value), -} - -/// `/search/transactions` allows the caller to search for transactions that meet certain conditions. Some conditions include matching a transaction hash, containing an operation with a certain status, or containing an operation that affects a certain account. `/search/transactions` is considered an \"indexer\" endpoint and Rosetta implementations are not required to complete it to adhere to the Rosetta spec. However, any Rosetta \"indexer\" MUST support this endpoint. -pub async fn search_transactions( - configuration: &configuration::Configuration, - search_transactions_request: models::SearchTransactionsRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/search/transactions", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&search_transactions_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} diff --git a/mesh_generated/src/lib.rs b/mesh_generated/src/lib.rs deleted file mode 100644 index d91a0d6..0000000 --- a/mesh_generated/src/lib.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![allow(unused_imports)] -#![allow(clippy::too_many_arguments)] - -extern crate reqwest; -extern crate serde; -extern crate serde_json; -extern crate url; - -pub mod apis; -pub mod models; diff --git a/mesh_generated/src/models/account_balance_request.rs b/mesh_generated/src/models/account_balance_request.rs deleted file mode 100644 index f40a53d..0000000 --- a/mesh_generated/src/models/account_balance_request.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// AccountBalanceRequest : An AccountBalanceRequest is utilized to make a balance request on the /account/balance endpoint. If the block_identifier is populated, a historical balance query should be performed. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccountBalanceRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - #[serde(rename = "account_identifier")] - pub account_identifier: Box, - #[serde(rename = "block_identifier", skip_serializing_if = "Option::is_none")] - pub block_identifier: Option>, - /// In some cases, the caller may not want to retrieve all available balances for an AccountIdentifier. If the currencies field is populated, only balances for the specified currencies will be returned. If not populated, all available balances will be returned. - #[serde(rename = "currencies", skip_serializing_if = "Option::is_none")] - pub currencies: Option>, -} - -impl AccountBalanceRequest { - /// An AccountBalanceRequest is utilized to make a balance request on the /account/balance endpoint. If the block_identifier is populated, a historical balance query should be performed. - pub fn new( - network_identifier: models::NetworkIdentifier, - account_identifier: models::AccountIdentifier, - ) -> AccountBalanceRequest { - AccountBalanceRequest { - network_identifier: Box::new(network_identifier), - account_identifier: Box::new(account_identifier), - block_identifier: None, - currencies: None, - } - } -} diff --git a/mesh_generated/src/models/account_balance_response.rs b/mesh_generated/src/models/account_balance_response.rs deleted file mode 100644 index 5b65444..0000000 --- a/mesh_generated/src/models/account_balance_response.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// AccountBalanceResponse : An AccountBalanceResponse is returned on the /account/balance endpoint. If an account has a balance for each AccountIdentifier describing it (ex: an ERC-20 token balance on a few smart contracts), an account balance request must be made with each AccountIdentifier. The `coins` field was removed and replaced by by `/account/coins` in `v1.4.7`. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccountBalanceResponse { - #[serde(rename = "block_identifier")] - pub block_identifier: Box, - /// A single account may have a balance in multiple currencies. - #[serde(rename = "balances")] - pub balances: Vec, - /// Account-based blockchains that utilize a nonce or sequence number should include that number in the metadata. This number could be unique to the identifier or global across the account address. - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl AccountBalanceResponse { - /// An AccountBalanceResponse is returned on the /account/balance endpoint. If an account has a balance for each AccountIdentifier describing it (ex: an ERC-20 token balance on a few smart contracts), an account balance request must be made with each AccountIdentifier. The `coins` field was removed and replaced by by `/account/coins` in `v1.4.7`. - pub fn new(block_identifier: models::BlockIdentifier, balances: Vec) -> AccountBalanceResponse { - AccountBalanceResponse { - block_identifier: Box::new(block_identifier), - balances, - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/account_coins_request.rs b/mesh_generated/src/models/account_coins_request.rs deleted file mode 100644 index 1c9efe8..0000000 --- a/mesh_generated/src/models/account_coins_request.rs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// AccountCoinsRequest : AccountCoinsRequest is utilized to make a request on the /account/coins endpoint. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccountCoinsRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - #[serde(rename = "account_identifier")] - pub account_identifier: Box, - /// Include state from the mempool when looking up an account's unspent coins. Note, using this functionality breaks any guarantee of idempotency. - #[serde(rename = "include_mempool")] - pub include_mempool: bool, - /// In some cases, the caller may not want to retrieve coins for all currencies for an AccountIdentifier. If the currencies field is populated, only coins for the specified currencies will be returned. If not populated, all unspent coins will be returned. - #[serde(rename = "currencies", skip_serializing_if = "Option::is_none")] - pub currencies: Option>, -} - -impl AccountCoinsRequest { - /// AccountCoinsRequest is utilized to make a request on the /account/coins endpoint. - pub fn new( - network_identifier: models::NetworkIdentifier, - account_identifier: models::AccountIdentifier, - include_mempool: bool, - ) -> AccountCoinsRequest { - AccountCoinsRequest { - network_identifier: Box::new(network_identifier), - account_identifier: Box::new(account_identifier), - include_mempool, - currencies: None, - } - } -} diff --git a/mesh_generated/src/models/account_coins_response.rs b/mesh_generated/src/models/account_coins_response.rs deleted file mode 100644 index d01dac3..0000000 --- a/mesh_generated/src/models/account_coins_response.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// AccountCoinsResponse : AccountCoinsResponse is returned on the /account/coins endpoint and includes all unspent Coins owned by an AccountIdentifier. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccountCoinsResponse { - #[serde(rename = "block_identifier")] - pub block_identifier: Box, - /// If a blockchain is UTXO-based, all unspent Coins owned by an account_identifier should be returned alongside the balance. It is highly recommended to populate this field so that users of the Rosetta API implementation don't need to maintain their own indexer to track their UTXOs. - #[serde(rename = "coins")] - pub coins: Vec, - /// Account-based blockchains that utilize a nonce or sequence number should include that number in the metadata. This number could be unique to the identifier or global across the account address. - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl AccountCoinsResponse { - /// AccountCoinsResponse is returned on the /account/coins endpoint and includes all unspent Coins owned by an AccountIdentifier. - pub fn new(block_identifier: models::BlockIdentifier, coins: Vec) -> AccountCoinsResponse { - AccountCoinsResponse { - block_identifier: Box::new(block_identifier), - coins, - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/account_identifier.rs b/mesh_generated/src/models/account_identifier.rs deleted file mode 100644 index 1c0d7c7..0000000 --- a/mesh_generated/src/models/account_identifier.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// AccountIdentifier : The account_identifier uniquely identifies an account within a network. All fields in the account_identifier are utilized to determine this uniqueness (including the metadata field, if populated). -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccountIdentifier { - /// The address may be a cryptographic public key (or some encoding of it) or a provided username. - #[serde(rename = "address")] - pub address: String, - #[serde(rename = "sub_account", skip_serializing_if = "Option::is_none")] - pub sub_account: Option>, - /// Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata. - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl AccountIdentifier { - /// The account_identifier uniquely identifies an account within a network. All fields in the account_identifier are utilized to determine this uniqueness (including the metadata field, if populated). - pub fn new(address: String) -> AccountIdentifier { - AccountIdentifier { - address, - sub_account: None, - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/allow.rs b/mesh_generated/src/models/allow.rs deleted file mode 100644 index 9de9584..0000000 --- a/mesh_generated/src/models/allow.rs +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// Allow : Allow specifies supported Operation status, Operation types, and all possible error statuses. This Allow object is used by clients to validate the correctness of a Rosetta Server implementation. It is expected that these clients will error if they receive some response that contains any of the above information that is not specified here. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Allow { - /// All Operation.Status this implementation supports. Any status that is returned during parsing that is not listed here will cause client validation to error. - #[serde(rename = "operation_statuses")] - pub operation_statuses: Vec, - /// All Operation.Type this implementation supports. Any type that is returned during parsing that is not listed here will cause client validation to error. - #[serde(rename = "operation_types")] - pub operation_types: Vec, - /// All Errors that this implementation could return. Any error that is returned during parsing that is not listed here will cause client validation to error. - #[serde(rename = "errors")] - pub errors: Vec, - /// Any Rosetta implementation that supports querying the balance of an account at any height in the past should set this to true. - #[serde(rename = "historical_balance_lookup")] - pub historical_balance_lookup: bool, - /// If populated, `timestamp_start_index` indicates the first block index where block timestamps are considered valid (i.e. all blocks less than `timestamp_start_index` could have invalid timestamps). This is useful when the genesis block (or blocks) of a network have timestamp 0. If not populated, block timestamps are assumed to be valid for all available blocks. - #[serde(rename = "timestamp_start_index", skip_serializing_if = "Option::is_none")] - pub timestamp_start_index: Option, - /// All methods that are supported by the /call endpoint. Communicating which parameters should be provided to /call is the responsibility of the implementer (this is en lieu of defining an entire type system and requiring the implementer to define that in Allow). - #[serde(rename = "call_methods")] - pub call_methods: Vec, - /// BalanceExemptions is an array of BalanceExemption indicating which account balances could change without a corresponding Operation. BalanceExemptions should be used sparingly as they may introduce significant complexity for integrators that attempt to reconcile all account balance changes. If your implementation relies on any BalanceExemptions, you MUST implement historical balance lookup (the ability to query an account balance at any BlockIdentifier). - #[serde(rename = "balance_exemptions")] - pub balance_exemptions: Vec, - /// Any Rosetta implementation that can update an AccountIdentifier's unspent coins based on the contents of the mempool should populate this field as true. If false, requests to `/account/coins` that set `include_mempool` as true will be automatically rejected. - #[serde(rename = "mempool_coins")] - pub mempool_coins: bool, - #[serde( - rename = "block_hash_case", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub block_hash_case: Option>, - #[serde( - rename = "transaction_hash_case", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub transaction_hash_case: Option>, -} - -impl Allow { - /// Allow specifies supported Operation status, Operation types, and all possible error statuses. This Allow object is used by clients to validate the correctness of a Rosetta Server implementation. It is expected that these clients will error if they receive some response that contains any of the above information that is not specified here. - pub fn new( - operation_statuses: Vec, - operation_types: Vec, - errors: Vec, - historical_balance_lookup: bool, - call_methods: Vec, - balance_exemptions: Vec, - mempool_coins: bool, - ) -> Allow { - Allow { - operation_statuses, - operation_types, - errors, - historical_balance_lookup, - timestamp_start_index: None, - call_methods, - balance_exemptions, - mempool_coins, - block_hash_case: None, - transaction_hash_case: None, - } - } -} diff --git a/mesh_generated/src/models/amount.rs b/mesh_generated/src/models/amount.rs deleted file mode 100644 index b6fe7e2..0000000 --- a/mesh_generated/src/models/amount.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// Amount : Amount is some Value of a Currency. It is considered invalid to specify a Value without a Currency. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Amount { - /// Value of the transaction in atomic units represented as an arbitrary-sized signed integer. For example, 1 BTC would be represented by a value of 100000000. - #[serde(rename = "value")] - pub value: String, - #[serde(rename = "currency")] - pub currency: Box, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl Amount { - /// Amount is some Value of a Currency. It is considered invalid to specify a Value without a Currency. - pub fn new(value: String, currency: models::Currency) -> Amount { - Amount { - value, - currency: Box::new(currency), - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/balance_exemption.rs b/mesh_generated/src/models/balance_exemption.rs deleted file mode 100644 index 31244b4..0000000 --- a/mesh_generated/src/models/balance_exemption.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// BalanceExemption : BalanceExemption indicates that the balance for an exempt account could change without a corresponding Operation. This typically occurs with staking rewards, vesting balances, and Currencies with a dynamic supply. Currently, it is possible to exempt an account from strict reconciliation by SubAccountIdentifier.Address or by Currency. This means that any account with SubAccountIdentifier.Address would be exempt or any balance of a particular Currency would be exempt, respectively. BalanceExemptions should be used sparingly as they may introduce significant complexity for integrators that attempt to reconcile all account balance changes. If your implementation relies on any BalanceExemptions, you MUST implement historical balance lookup (the ability to query an account balance at any BlockIdentifier). -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct BalanceExemption { - /// SubAccountAddress is the SubAccountIdentifier.Address that the BalanceExemption applies to (regardless of the value of SubAccountIdentifier.Metadata). - #[serde(rename = "sub_account_address", skip_serializing_if = "Option::is_none")] - pub sub_account_address: Option, - #[serde(rename = "currency", skip_serializing_if = "Option::is_none")] - pub currency: Option>, - #[serde(rename = "exemption_type", skip_serializing_if = "Option::is_none")] - pub exemption_type: Option, -} - -impl BalanceExemption { - /// BalanceExemption indicates that the balance for an exempt account could change without a corresponding Operation. This typically occurs with staking rewards, vesting balances, and Currencies with a dynamic supply. Currently, it is possible to exempt an account from strict reconciliation by SubAccountIdentifier.Address or by Currency. This means that any account with SubAccountIdentifier.Address would be exempt or any balance of a particular Currency would be exempt, respectively. BalanceExemptions should be used sparingly as they may introduce significant complexity for integrators that attempt to reconcile all account balance changes. If your implementation relies on any BalanceExemptions, you MUST implement historical balance lookup (the ability to query an account balance at any BlockIdentifier). - pub fn new() -> BalanceExemption { - BalanceExemption { - sub_account_address: None, - currency: None, - exemption_type: None, - } - } -} diff --git a/mesh_generated/src/models/block.rs b/mesh_generated/src/models/block.rs deleted file mode 100644 index 974e7c0..0000000 --- a/mesh_generated/src/models/block.rs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// Block : Blocks contain an array of Transactions that occurred at a particular BlockIdentifier. A hard requirement for blocks returned by Rosetta implementations is that they MUST be _inalterable_: once a client has requested and received a block identified by a specific BlockIndentifier, all future calls for that same BlockIdentifier must return the same block contents. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Block { - #[serde(rename = "block_identifier")] - pub block_identifier: Box, - #[serde(rename = "parent_block_identifier")] - pub parent_block_identifier: Box, - /// The timestamp of the block in milliseconds since the Unix Epoch. The timestamp is stored in milliseconds because some blockchains produce blocks more often than once a second. - #[serde(rename = "timestamp")] - pub timestamp: i64, - #[serde(rename = "transactions")] - pub transactions: Vec, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl Block { - /// Blocks contain an array of Transactions that occurred at a particular BlockIdentifier. A hard requirement for blocks returned by Rosetta implementations is that they MUST be _inalterable_: once a client has requested and received a block identified by a specific BlockIndentifier, all future calls for that same BlockIdentifier must return the same block contents. - pub fn new( - block_identifier: models::BlockIdentifier, - parent_block_identifier: models::BlockIdentifier, - timestamp: i64, - transactions: Vec, - ) -> Block { - Block { - block_identifier: Box::new(block_identifier), - parent_block_identifier: Box::new(parent_block_identifier), - timestamp, - transactions, - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/block_event.rs b/mesh_generated/src/models/block_event.rs deleted file mode 100644 index 53ba5de..0000000 --- a/mesh_generated/src/models/block_event.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// BlockEvent : BlockEvent represents the addition or removal of a BlockIdentifier from storage. Streaming BlockEvents allows lightweight clients to update their own state without needing to implement their own syncing logic. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct BlockEvent { - /// sequence is the unique identifier of a BlockEvent within the context of a NetworkIdentifier. - #[serde(rename = "sequence")] - pub sequence: i64, - #[serde(rename = "block_identifier")] - pub block_identifier: Box, - #[serde(rename = "type")] - pub r#type: models::BlockEventType, -} - -impl BlockEvent { - /// BlockEvent represents the addition or removal of a BlockIdentifier from storage. Streaming BlockEvents allows lightweight clients to update their own state without needing to implement their own syncing logic. - pub fn new(sequence: i64, block_identifier: models::BlockIdentifier, r#type: models::BlockEventType) -> BlockEvent { - BlockEvent { - sequence, - block_identifier: Box::new(block_identifier), - r#type, - } - } -} diff --git a/mesh_generated/src/models/block_event_type.rs b/mesh_generated/src/models/block_event_type.rs deleted file mode 100644 index 95e8f1e..0000000 --- a/mesh_generated/src/models/block_event_type.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// BlockEventType : BlockEventType determines if a BlockEvent represents the addition or removal of a block. -/// BlockEventType determines if a BlockEvent represents the addition or removal of a block. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum BlockEventType { - #[serde(rename = "block_added")] - Added, - #[serde(rename = "block_removed")] - Removed, -} - -impl std::fmt::Display for BlockEventType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Added => write!(f, "block_added"), - Self::Removed => write!(f, "block_removed"), - } - } -} - -impl Default for BlockEventType { - fn default() -> BlockEventType { - Self::Added - } -} diff --git a/mesh_generated/src/models/block_identifier.rs b/mesh_generated/src/models/block_identifier.rs deleted file mode 100644 index 38d7d46..0000000 --- a/mesh_generated/src/models/block_identifier.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// BlockIdentifier : The block_identifier uniquely identifies a block in a particular network. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct BlockIdentifier { - /// This is also known as the block height. - #[serde(rename = "index")] - pub index: i64, - /// This should be normalized according to the case specified in the block_hash_case network options. - #[serde(rename = "hash")] - pub hash: String, -} - -impl BlockIdentifier { - /// The block_identifier uniquely identifies a block in a particular network. - pub fn new(index: i64, hash: String) -> BlockIdentifier { - BlockIdentifier { index, hash } - } -} diff --git a/mesh_generated/src/models/block_request.rs b/mesh_generated/src/models/block_request.rs deleted file mode 100644 index b5c6ea6..0000000 --- a/mesh_generated/src/models/block_request.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// BlockRequest : A BlockRequest is utilized to make a block request on the /block endpoint. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct BlockRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - #[serde(rename = "block_identifier")] - pub block_identifier: Box, -} - -impl BlockRequest { - /// A BlockRequest is utilized to make a block request on the /block endpoint. - pub fn new( - network_identifier: models::NetworkIdentifier, - block_identifier: models::PartialBlockIdentifier, - ) -> BlockRequest { - BlockRequest { - network_identifier: Box::new(network_identifier), - block_identifier: Box::new(block_identifier), - } - } -} diff --git a/mesh_generated/src/models/block_response.rs b/mesh_generated/src/models/block_response.rs deleted file mode 100644 index 87cb414..0000000 --- a/mesh_generated/src/models/block_response.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// BlockResponse : A BlockResponse includes a fully-populated block or a partially-populated block with a list of other transactions to fetch (other_transactions). As a result of the consensus algorithm of some blockchains, blocks can be omitted (i.e. certain block indices can be skipped). If a query for one of these omitted indices is made, the response should not include a `Block` object. It is VERY important to note that blocks MUST still form a canonical, connected chain of blocks where each block has a unique index. In other words, the `PartialBlockIdentifier` of a block after an omitted block should reference the last non-omitted block. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct BlockResponse { - #[serde(rename = "block", skip_serializing_if = "Option::is_none")] - pub block: Option>, - /// Some blockchains may require additional transactions to be fetched that weren't returned in the block response (ex: block only returns transaction hashes). For blockchains with a lot of transactions in each block, this can be very useful as consumers can concurrently fetch all transactions returned. - #[serde(rename = "other_transactions", skip_serializing_if = "Option::is_none")] - pub other_transactions: Option>, -} - -impl BlockResponse { - /// A BlockResponse includes a fully-populated block or a partially-populated block with a list of other transactions to fetch (other_transactions). As a result of the consensus algorithm of some blockchains, blocks can be omitted (i.e. certain block indices can be skipped). If a query for one of these omitted indices is made, the response should not include a `Block` object. It is VERY important to note that blocks MUST still form a canonical, connected chain of blocks where each block has a unique index. In other words, the `PartialBlockIdentifier` of a block after an omitted block should reference the last non-omitted block. - pub fn new() -> BlockResponse { - BlockResponse { - block: None, - other_transactions: None, - } - } -} diff --git a/mesh_generated/src/models/block_transaction.rs b/mesh_generated/src/models/block_transaction.rs deleted file mode 100644 index 2327931..0000000 --- a/mesh_generated/src/models/block_transaction.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// BlockTransaction : BlockTransaction contains a populated Transaction and the BlockIdentifier that contains it. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct BlockTransaction { - #[serde(rename = "block_identifier")] - pub block_identifier: Box, - #[serde(rename = "transaction")] - pub transaction: Box, -} - -impl BlockTransaction { - /// BlockTransaction contains a populated Transaction and the BlockIdentifier that contains it. - pub fn new(block_identifier: models::BlockIdentifier, transaction: models::Transaction) -> BlockTransaction { - BlockTransaction { - block_identifier: Box::new(block_identifier), - transaction: Box::new(transaction), - } - } -} diff --git a/mesh_generated/src/models/block_transaction_request.rs b/mesh_generated/src/models/block_transaction_request.rs deleted file mode 100644 index 645ac12..0000000 --- a/mesh_generated/src/models/block_transaction_request.rs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// BlockTransactionRequest : A BlockTransactionRequest is used to fetch a Transaction included in a block that is not returned in a BlockResponse. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct BlockTransactionRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - #[serde(rename = "block_identifier")] - pub block_identifier: Box, - #[serde(rename = "transaction_identifier")] - pub transaction_identifier: Box, -} - -impl BlockTransactionRequest { - /// A BlockTransactionRequest is used to fetch a Transaction included in a block that is not returned in a BlockResponse. - pub fn new( - network_identifier: models::NetworkIdentifier, - block_identifier: models::BlockIdentifier, - transaction_identifier: models::TransactionIdentifier, - ) -> BlockTransactionRequest { - BlockTransactionRequest { - network_identifier: Box::new(network_identifier), - block_identifier: Box::new(block_identifier), - transaction_identifier: Box::new(transaction_identifier), - } - } -} diff --git a/mesh_generated/src/models/block_transaction_response.rs b/mesh_generated/src/models/block_transaction_response.rs deleted file mode 100644 index 471b65e..0000000 --- a/mesh_generated/src/models/block_transaction_response.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// BlockTransactionResponse : A BlockTransactionResponse contains information about a block transaction. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct BlockTransactionResponse { - #[serde(rename = "transaction")] - pub transaction: Box, -} - -impl BlockTransactionResponse { - /// A BlockTransactionResponse contains information about a block transaction. - pub fn new(transaction: models::Transaction) -> BlockTransactionResponse { - BlockTransactionResponse { - transaction: Box::new(transaction), - } - } -} diff --git a/mesh_generated/src/models/call_request.rs b/mesh_generated/src/models/call_request.rs deleted file mode 100644 index 6b5f644..0000000 --- a/mesh_generated/src/models/call_request.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// CallRequest : CallRequest is the input to the `/call` endpoint. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CallRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - /// Method is some network-specific procedure call. This method could map to a network-specific RPC endpoint, a method in an SDK generated from a smart contract, or some hybrid of the two. The implementation must define all available methods in the Allow object. However, it is up to the caller to determine which parameters to provide when invoking `/call`. - #[serde(rename = "method")] - pub method: String, - /// Parameters is some network-specific argument for a method. It is up to the caller to determine which parameters to provide when invoking `/call`. - #[serde(rename = "parameters")] - pub parameters: serde_json::Value, -} - -impl CallRequest { - /// CallRequest is the input to the `/call` endpoint. - pub fn new( - network_identifier: models::NetworkIdentifier, - method: String, - parameters: serde_json::Value, - ) -> CallRequest { - CallRequest { - network_identifier: Box::new(network_identifier), - method, - parameters, - } - } -} diff --git a/mesh_generated/src/models/call_response.rs b/mesh_generated/src/models/call_response.rs deleted file mode 100644 index e59e6fd..0000000 --- a/mesh_generated/src/models/call_response.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// CallResponse : CallResponse contains the result of a `/call` invocation. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CallResponse { - /// Result contains the result of the `/call` invocation. This result will not be inspected or interpreted by Rosetta tooling and is left to the caller to decode. - #[serde(rename = "result")] - pub result: serde_json::Value, - /// Idempotent indicates that if `/call` is invoked with the same CallRequest again, at any point in time, it will return the same CallResponse. Integrators may cache the CallResponse if this is set to true to avoid making unnecessary calls to the Rosetta implementation. For this reason, implementers should be very conservative about returning true here or they could cause issues for the caller. - #[serde(rename = "idempotent")] - pub idempotent: bool, -} - -impl CallResponse { - /// CallResponse contains the result of a `/call` invocation. - pub fn new(result: serde_json::Value, idempotent: bool) -> CallResponse { - CallResponse { result, idempotent } - } -} diff --git a/mesh_generated/src/models/case.rs b/mesh_generated/src/models/case.rs deleted file mode 100644 index b81394b..0000000 --- a/mesh_generated/src/models/case.rs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// Case : Case specifies the expected case for strings and hashes. -/// Case specifies the expected case for strings and hashes. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Case { - #[serde(rename = "upper_case")] - UpperCase, - #[serde(rename = "lower_case")] - LowerCase, - #[serde(rename = "case_sensitive")] - CaseSensitive, - #[serde(rename = "null")] - Null, -} - -impl std::fmt::Display for Case { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::UpperCase => write!(f, "upper_case"), - Self::LowerCase => write!(f, "lower_case"), - Self::CaseSensitive => write!(f, "case_sensitive"), - Self::Null => write!(f, "null"), - } - } -} - -impl Default for Case { - fn default() -> Case { - Self::UpperCase - } -} diff --git a/mesh_generated/src/models/coin.rs b/mesh_generated/src/models/coin.rs deleted file mode 100644 index 7b0e390..0000000 --- a/mesh_generated/src/models/coin.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// Coin : Coin contains its unique identifier and the amount it represents. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Coin { - #[serde(rename = "coin_identifier")] - pub coin_identifier: Box, - #[serde(rename = "amount")] - pub amount: Box, -} - -impl Coin { - /// Coin contains its unique identifier and the amount it represents. - pub fn new(coin_identifier: models::CoinIdentifier, amount: models::Amount) -> Coin { - Coin { - coin_identifier: Box::new(coin_identifier), - amount: Box::new(amount), - } - } -} diff --git a/mesh_generated/src/models/coin_action.rs b/mesh_generated/src/models/coin_action.rs deleted file mode 100644 index 0af67bd..0000000 --- a/mesh_generated/src/models/coin_action.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// CoinAction : CoinActions are different state changes that a Coin can undergo. When a Coin is created, it is coin_created. When a Coin is spent, it is coin_spent. It is assumed that a single Coin cannot be created or spent more than once. -/// CoinActions are different state changes that a Coin can undergo. When a Coin is created, it is coin_created. When a Coin is spent, it is coin_spent. It is assumed that a single Coin cannot be created or spent more than once. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum CoinAction { - #[serde(rename = "coin_created")] - Created, - #[serde(rename = "coin_spent")] - Spent, -} - -impl std::fmt::Display for CoinAction { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Created => write!(f, "coin_created"), - Self::Spent => write!(f, "coin_spent"), - } - } -} - -impl Default for CoinAction { - fn default() -> CoinAction { - Self::Created - } -} diff --git a/mesh_generated/src/models/coin_change.rs b/mesh_generated/src/models/coin_change.rs deleted file mode 100644 index 7cc35ca..0000000 --- a/mesh_generated/src/models/coin_change.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// CoinChange : CoinChange is used to represent a change in state of a some coin identified by a coin_identifier. This object is part of the Operation model and must be populated for UTXO-based blockchains. Coincidentally, this abstraction of UTXOs allows for supporting both account-based transfers and UTXO-based transfers on the same blockchain (when a transfer is account-based, don't populate this model). -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CoinChange { - #[serde(rename = "coin_identifier")] - pub coin_identifier: Box, - #[serde(rename = "coin_action")] - pub coin_action: models::CoinAction, -} - -impl CoinChange { - /// CoinChange is used to represent a change in state of a some coin identified by a coin_identifier. This object is part of the Operation model and must be populated for UTXO-based blockchains. Coincidentally, this abstraction of UTXOs allows for supporting both account-based transfers and UTXO-based transfers on the same blockchain (when a transfer is account-based, don't populate this model). - pub fn new(coin_identifier: models::CoinIdentifier, coin_action: models::CoinAction) -> CoinChange { - CoinChange { - coin_identifier: Box::new(coin_identifier), - coin_action, - } - } -} diff --git a/mesh_generated/src/models/coin_identifier.rs b/mesh_generated/src/models/coin_identifier.rs deleted file mode 100644 index 4604b0b..0000000 --- a/mesh_generated/src/models/coin_identifier.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// CoinIdentifier : CoinIdentifier uniquely identifies a Coin. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CoinIdentifier { - /// Identifier should be populated with a globally unique identifier of a Coin. In Bitcoin, this identifier would be transaction_hash:index. - #[serde(rename = "identifier")] - pub identifier: String, -} - -impl CoinIdentifier { - /// CoinIdentifier uniquely identifies a Coin. - pub fn new(identifier: String) -> CoinIdentifier { - CoinIdentifier { identifier } - } -} diff --git a/mesh_generated/src/models/construction_combine_request.rs b/mesh_generated/src/models/construction_combine_request.rs deleted file mode 100644 index b80430b..0000000 --- a/mesh_generated/src/models/construction_combine_request.rs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ConstructionCombineRequest : ConstructionCombineRequest is the input to the `/construction/combine` endpoint. It contains the unsigned transaction blob returned by `/construction/payloads` and all required signatures to create a network transaction. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConstructionCombineRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - #[serde(rename = "unsigned_transaction")] - pub unsigned_transaction: String, - #[serde(rename = "signatures")] - pub signatures: Vec, -} - -impl ConstructionCombineRequest { - /// ConstructionCombineRequest is the input to the `/construction/combine` endpoint. It contains the unsigned transaction blob returned by `/construction/payloads` and all required signatures to create a network transaction. - pub fn new( - network_identifier: models::NetworkIdentifier, - unsigned_transaction: String, - signatures: Vec, - ) -> ConstructionCombineRequest { - ConstructionCombineRequest { - network_identifier: Box::new(network_identifier), - unsigned_transaction, - signatures, - } - } -} diff --git a/mesh_generated/src/models/construction_combine_response.rs b/mesh_generated/src/models/construction_combine_response.rs deleted file mode 100644 index 174cbb1..0000000 --- a/mesh_generated/src/models/construction_combine_response.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ConstructionCombineResponse : ConstructionCombineResponse is returned by `/construction/combine`. The network payload will be sent directly to the `construction/submit` endpoint. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConstructionCombineResponse { - #[serde(rename = "signed_transaction")] - pub signed_transaction: String, -} - -impl ConstructionCombineResponse { - /// ConstructionCombineResponse is returned by `/construction/combine`. The network payload will be sent directly to the `construction/submit` endpoint. - pub fn new(signed_transaction: String) -> ConstructionCombineResponse { - ConstructionCombineResponse { signed_transaction } - } -} diff --git a/mesh_generated/src/models/construction_derive_request.rs b/mesh_generated/src/models/construction_derive_request.rs deleted file mode 100644 index 8ea5b7e..0000000 --- a/mesh_generated/src/models/construction_derive_request.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ConstructionDeriveRequest : ConstructionDeriveRequest is passed to the `/construction/derive` endpoint. Network is provided in the request because some blockchains have different address formats for different networks. Metadata is provided in the request because some blockchains allow for multiple address types (i.e. different address for validators vs normal accounts). -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConstructionDeriveRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - #[serde(rename = "public_key")] - pub public_key: Box, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl ConstructionDeriveRequest { - /// ConstructionDeriveRequest is passed to the `/construction/derive` endpoint. Network is provided in the request because some blockchains have different address formats for different networks. Metadata is provided in the request because some blockchains allow for multiple address types (i.e. different address for validators vs normal accounts). - pub fn new( - network_identifier: models::NetworkIdentifier, - public_key: models::PublicKey, - ) -> ConstructionDeriveRequest { - ConstructionDeriveRequest { - network_identifier: Box::new(network_identifier), - public_key: Box::new(public_key), - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/construction_derive_response.rs b/mesh_generated/src/models/construction_derive_response.rs deleted file mode 100644 index 7703fcb..0000000 --- a/mesh_generated/src/models/construction_derive_response.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ConstructionDeriveResponse : ConstructionDeriveResponse is returned by the `/construction/derive` endpoint. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConstructionDeriveResponse { - /// [DEPRECATED by `account_identifier` in `v1.4.4`] Address in network-specific format. - #[serde(rename = "address", skip_serializing_if = "Option::is_none")] - pub address: Option, - #[serde(rename = "account_identifier", skip_serializing_if = "Option::is_none")] - pub account_identifier: Option>, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl ConstructionDeriveResponse { - /// ConstructionDeriveResponse is returned by the `/construction/derive` endpoint. - pub fn new() -> ConstructionDeriveResponse { - ConstructionDeriveResponse { - address: None, - account_identifier: None, - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/construction_hash_request.rs b/mesh_generated/src/models/construction_hash_request.rs deleted file mode 100644 index 5bcd4a1..0000000 --- a/mesh_generated/src/models/construction_hash_request.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ConstructionHashRequest : ConstructionHashRequest is the input to the `/construction/hash` endpoint. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConstructionHashRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - #[serde(rename = "signed_transaction")] - pub signed_transaction: String, -} - -impl ConstructionHashRequest { - /// ConstructionHashRequest is the input to the `/construction/hash` endpoint. - pub fn new(network_identifier: models::NetworkIdentifier, signed_transaction: String) -> ConstructionHashRequest { - ConstructionHashRequest { - network_identifier: Box::new(network_identifier), - signed_transaction, - } - } -} diff --git a/mesh_generated/src/models/construction_metadata_request.rs b/mesh_generated/src/models/construction_metadata_request.rs deleted file mode 100644 index cecb875..0000000 --- a/mesh_generated/src/models/construction_metadata_request.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ConstructionMetadataRequest : A ConstructionMetadataRequest is utilized to get information required to construct a transaction. The Options object used to specify which metadata to return is left purposely unstructured to allow flexibility for implementers. Options is not required in the case that there is network-wide metadata of interest. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConstructionMetadataRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - /// Some blockchains require different metadata for different types of transaction construction (ex: delegation versus a transfer). Instead of requiring a blockchain node to return all possible types of metadata for construction (which may require multiple node fetches), the client can populate an options object to limit the metadata returned to only the subset required. - #[serde(rename = "options", skip_serializing_if = "Option::is_none")] - pub options: Option, - #[serde(rename = "public_keys", skip_serializing_if = "Option::is_none")] - pub public_keys: Option>, -} - -impl ConstructionMetadataRequest { - /// A ConstructionMetadataRequest is utilized to get information required to construct a transaction. The Options object used to specify which metadata to return is left purposely unstructured to allow flexibility for implementers. Options is not required in the case that there is network-wide metadata of interest. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse. - pub fn new(network_identifier: models::NetworkIdentifier) -> ConstructionMetadataRequest { - ConstructionMetadataRequest { - network_identifier: Box::new(network_identifier), - options: None, - public_keys: None, - } - } -} diff --git a/mesh_generated/src/models/construction_metadata_response.rs b/mesh_generated/src/models/construction_metadata_response.rs deleted file mode 100644 index cc92920..0000000 --- a/mesh_generated/src/models/construction_metadata_response.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ConstructionMetadataResponse : The ConstructionMetadataResponse returns network-specific metadata used for transaction construction. Optionally, the implementer can return the suggested fee associated with the transaction being constructed. The caller may use this info to adjust the intent of the transaction or to create a transaction with a different account that can pay the suggested fee. Suggested fee is an array in case fee payment must occur in multiple currencies. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConstructionMetadataResponse { - #[serde(rename = "metadata")] - pub metadata: serde_json::Value, - #[serde(rename = "suggested_fee", skip_serializing_if = "Option::is_none")] - pub suggested_fee: Option>, -} - -impl ConstructionMetadataResponse { - /// The ConstructionMetadataResponse returns network-specific metadata used for transaction construction. Optionally, the implementer can return the suggested fee associated with the transaction being constructed. The caller may use this info to adjust the intent of the transaction or to create a transaction with a different account that can pay the suggested fee. Suggested fee is an array in case fee payment must occur in multiple currencies. - pub fn new(metadata: serde_json::Value) -> ConstructionMetadataResponse { - ConstructionMetadataResponse { - metadata, - suggested_fee: None, - } - } -} diff --git a/mesh_generated/src/models/construction_parse_request.rs b/mesh_generated/src/models/construction_parse_request.rs deleted file mode 100644 index f0d273c..0000000 --- a/mesh_generated/src/models/construction_parse_request.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ConstructionParseRequest : ConstructionParseRequest is the input to the `/construction/parse` endpoint. It allows the caller to parse either an unsigned or signed transaction. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConstructionParseRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - /// Signed is a boolean indicating whether the transaction is signed. - #[serde(rename = "signed")] - pub signed: bool, - /// This must be either the unsigned transaction blob returned by `/construction/payloads` or the signed transaction blob returned by `/construction/combine`. - #[serde(rename = "transaction")] - pub transaction: String, -} - -impl ConstructionParseRequest { - /// ConstructionParseRequest is the input to the `/construction/parse` endpoint. It allows the caller to parse either an unsigned or signed transaction. - pub fn new( - network_identifier: models::NetworkIdentifier, - signed: bool, - transaction: String, - ) -> ConstructionParseRequest { - ConstructionParseRequest { - network_identifier: Box::new(network_identifier), - signed, - transaction, - } - } -} diff --git a/mesh_generated/src/models/construction_parse_response.rs b/mesh_generated/src/models/construction_parse_response.rs deleted file mode 100644 index a968e55..0000000 --- a/mesh_generated/src/models/construction_parse_response.rs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ConstructionParseResponse : ConstructionParseResponse contains an array of operations that occur in a transaction blob. This should match the array of operations provided to `/construction/preprocess` and `/construction/payloads`. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConstructionParseResponse { - #[serde(rename = "operations")] - pub operations: Vec, - /// [DEPRECATED by `account_identifier_signers` in `v1.4.4`] All signers (addresses) of a particular transaction. If the transaction is unsigned, it should be empty. - #[serde(rename = "signers", skip_serializing_if = "Option::is_none")] - pub signers: Option>, - #[serde(rename = "account_identifier_signers", skip_serializing_if = "Option::is_none")] - pub account_identifier_signers: Option>, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl ConstructionParseResponse { - /// ConstructionParseResponse contains an array of operations that occur in a transaction blob. This should match the array of operations provided to `/construction/preprocess` and `/construction/payloads`. - pub fn new(operations: Vec) -> ConstructionParseResponse { - ConstructionParseResponse { - operations, - signers: None, - account_identifier_signers: None, - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/construction_payloads_request.rs b/mesh_generated/src/models/construction_payloads_request.rs deleted file mode 100644 index 5591c85..0000000 --- a/mesh_generated/src/models/construction_payloads_request.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ConstructionPayloadsRequest : ConstructionPayloadsRequest is the request to `/construction/payloads`. It contains the network, a slice of operations, and arbitrary metadata that was returned by the call to `/construction/metadata`. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConstructionPayloadsRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - #[serde(rename = "operations")] - pub operations: Vec, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, - #[serde(rename = "public_keys", skip_serializing_if = "Option::is_none")] - pub public_keys: Option>, -} - -impl ConstructionPayloadsRequest { - /// ConstructionPayloadsRequest is the request to `/construction/payloads`. It contains the network, a slice of operations, and arbitrary metadata that was returned by the call to `/construction/metadata`. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse. - pub fn new( - network_identifier: models::NetworkIdentifier, - operations: Vec, - ) -> ConstructionPayloadsRequest { - ConstructionPayloadsRequest { - network_identifier: Box::new(network_identifier), - operations, - metadata: None, - public_keys: None, - } - } -} diff --git a/mesh_generated/src/models/construction_payloads_response.rs b/mesh_generated/src/models/construction_payloads_response.rs deleted file mode 100644 index daf6f8c..0000000 --- a/mesh_generated/src/models/construction_payloads_response.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ConstructionPayloadsResponse : ConstructionTransactionResponse is returned by `/construction/payloads`. It contains an unsigned transaction blob (that is usually needed to construct the a network transaction from a collection of signatures) and an array of payloads that must be signed by the caller. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConstructionPayloadsResponse { - #[serde(rename = "unsigned_transaction")] - pub unsigned_transaction: String, - #[serde(rename = "payloads")] - pub payloads: Vec, -} - -impl ConstructionPayloadsResponse { - /// ConstructionTransactionResponse is returned by `/construction/payloads`. It contains an unsigned transaction blob (that is usually needed to construct the a network transaction from a collection of signatures) and an array of payloads that must be signed by the caller. - pub fn new(unsigned_transaction: String, payloads: Vec) -> ConstructionPayloadsResponse { - ConstructionPayloadsResponse { - unsigned_transaction, - payloads, - } - } -} diff --git a/mesh_generated/src/models/construction_preprocess_request.rs b/mesh_generated/src/models/construction_preprocess_request.rs deleted file mode 100644 index 56938f2..0000000 --- a/mesh_generated/src/models/construction_preprocess_request.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ConstructionPreprocessRequest : ConstructionPreprocessRequest is passed to the `/construction/preprocess` endpoint so that a Rosetta implementation can determine which metadata it needs to request for construction. Metadata provided in this object should NEVER be a product of live data (i.e. the caller must follow some network-specific data fetching strategy outside of the Construction API to populate required Metadata). If live data is required for construction, it MUST be fetched in the call to `/construction/metadata`. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConstructionPreprocessRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - #[serde(rename = "operations")] - pub operations: Vec, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl ConstructionPreprocessRequest { - /// ConstructionPreprocessRequest is passed to the `/construction/preprocess` endpoint so that a Rosetta implementation can determine which metadata it needs to request for construction. Metadata provided in this object should NEVER be a product of live data (i.e. the caller must follow some network-specific data fetching strategy outside of the Construction API to populate required Metadata). If live data is required for construction, it MUST be fetched in the call to `/construction/metadata`. - pub fn new( - network_identifier: models::NetworkIdentifier, - operations: Vec, - ) -> ConstructionPreprocessRequest { - ConstructionPreprocessRequest { - network_identifier: Box::new(network_identifier), - operations, - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/construction_preprocess_response.rs b/mesh_generated/src/models/construction_preprocess_response.rs deleted file mode 100644 index 411fccc..0000000 --- a/mesh_generated/src/models/construction_preprocess_response.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ConstructionPreprocessResponse : ConstructionPreprocessResponse contains `options` that will be sent unmodified to `/construction/metadata`. If it is not necessary to make a request to `/construction/metadata`, `options` should be omitted. Some blockchains require the PublicKey of particular AccountIdentifiers to construct a valid transaction. To fetch these PublicKeys, populate `required_public_keys` with the AccountIdentifiers associated with the desired PublicKeys. If it is not necessary to retrieve any PublicKeys for construction, `required_public_keys` should be omitted. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConstructionPreprocessResponse { - /// The options that will be sent directly to `/construction/metadata` by the caller. - #[serde(rename = "options", skip_serializing_if = "Option::is_none")] - pub options: Option, - #[serde(rename = "required_public_keys", skip_serializing_if = "Option::is_none")] - pub required_public_keys: Option>, -} - -impl ConstructionPreprocessResponse { - /// ConstructionPreprocessResponse contains `options` that will be sent unmodified to `/construction/metadata`. If it is not necessary to make a request to `/construction/metadata`, `options` should be omitted. Some blockchains require the PublicKey of particular AccountIdentifiers to construct a valid transaction. To fetch these PublicKeys, populate `required_public_keys` with the AccountIdentifiers associated with the desired PublicKeys. If it is not necessary to retrieve any PublicKeys for construction, `required_public_keys` should be omitted. - pub fn new() -> ConstructionPreprocessResponse { - ConstructionPreprocessResponse { - options: None, - required_public_keys: None, - } - } -} diff --git a/mesh_generated/src/models/construction_submit_request.rs b/mesh_generated/src/models/construction_submit_request.rs deleted file mode 100644 index 42c5faa..0000000 --- a/mesh_generated/src/models/construction_submit_request.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ConstructionSubmitRequest : The transaction submission request includes a signed transaction. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConstructionSubmitRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - #[serde(rename = "signed_transaction")] - pub signed_transaction: String, -} - -impl ConstructionSubmitRequest { - /// The transaction submission request includes a signed transaction. - pub fn new(network_identifier: models::NetworkIdentifier, signed_transaction: String) -> ConstructionSubmitRequest { - ConstructionSubmitRequest { - network_identifier: Box::new(network_identifier), - signed_transaction, - } - } -} diff --git a/mesh_generated/src/models/currency.rs b/mesh_generated/src/models/currency.rs deleted file mode 100644 index 8d9b521..0000000 --- a/mesh_generated/src/models/currency.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// Currency : Currency is composed of a canonical Symbol and Decimals. This Decimals value is used to convert an Amount.Value from atomic units (Satoshis) to standard units (Bitcoins). -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Currency { - /// Canonical symbol associated with a currency. - #[serde(rename = "symbol")] - pub symbol: String, - /// Number of decimal places in the standard unit representation of the amount. For example, BTC has 8 decimals. Note that it is not possible to represent the value of some currency in atomic units that is not base 10. - #[serde(rename = "decimals")] - pub decimals: i32, - /// Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token. - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl Currency { - /// Currency is composed of a canonical Symbol and Decimals. This Decimals value is used to convert an Amount.Value from atomic units (Satoshis) to standard units (Bitcoins). - pub fn new(symbol: String, decimals: i32) -> Currency { - Currency { - symbol, - decimals, - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/curve_type.rs b/mesh_generated/src/models/curve_type.rs deleted file mode 100644 index 7770778..0000000 --- a/mesh_generated/src/models/curve_type.rs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// CurveType : CurveType is the type of cryptographic curve associated with a PublicKey. * secp256k1: SEC compressed - `33 bytes` (https://secg.org/sec1-v2.pdf#subsubsection.2.3.3) * secp256k1_bip340: x-only - `32 bytes` (implicitly even `Y` coord. Secp256k1 compressed keys may be repurposed by dropping the first byte. (https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#Public_Key_Generation)) * secp256r1: SEC compressed - `33 bytes` (https://secg.org/sec1-v2.pdf#subsubsection.2.3.3) * edwards25519: `y (255-bits) || x-sign-bit (1-bit)` - `32 bytes` (https://ed25519.cr.yp.to/ed25519-20110926.pdf) * tweedle: 1st pk : Fq.t (32 bytes) || 2nd pk : Fq.t (32 bytes) (https://github.com/CodaProtocol/coda/blob/develop/rfcs/0038-rosetta-construction-api.md#marshal-keys) * pallas: `x (255 bits) || y-parity-bit (1-bit) - 32 bytes` (https://github.com/zcash/pasta) -/// CurveType is the type of cryptographic curve associated with a PublicKey. * secp256k1: SEC compressed - `33 bytes` (https://secg.org/sec1-v2.pdf#subsubsection.2.3.3) * secp256k1_bip340: x-only - `32 bytes` (implicitly even `Y` coord. Secp256k1 compressed keys may be repurposed by dropping the first byte. (https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#Public_Key_Generation)) * secp256r1: SEC compressed - `33 bytes` (https://secg.org/sec1-v2.pdf#subsubsection.2.3.3) * edwards25519: `y (255-bits) || x-sign-bit (1-bit)` - `32 bytes` (https://ed25519.cr.yp.to/ed25519-20110926.pdf) * tweedle: 1st pk : Fq.t (32 bytes) || 2nd pk : Fq.t (32 bytes) (https://github.com/CodaProtocol/coda/blob/develop/rfcs/0038-rosetta-construction-api.md#marshal-keys) * pallas: `x (255 bits) || y-parity-bit (1-bit) - 32 bytes` (https://github.com/zcash/pasta) -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum CurveType { - #[serde(rename = "secp256k1")] - Secp256k1, - #[serde(rename = "secp256k1_bip340")] - Secp256k1Bip340, - #[serde(rename = "secp256r1")] - Secp256r1, - #[serde(rename = "edwards25519")] - Edwards25519, - #[serde(rename = "tweedle")] - Tweedle, - #[serde(rename = "pallas")] - Pallas, -} - -impl std::fmt::Display for CurveType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Secp256k1 => write!(f, "secp256k1"), - Self::Secp256k1Bip340 => write!(f, "secp256k1_bip340"), - Self::Secp256r1 => write!(f, "secp256r1"), - Self::Edwards25519 => write!(f, "edwards25519"), - Self::Tweedle => write!(f, "tweedle"), - Self::Pallas => write!(f, "pallas"), - } - } -} - -impl Default for CurveType { - fn default() -> CurveType { - Self::Secp256k1 - } -} diff --git a/mesh_generated/src/models/direction.rs b/mesh_generated/src/models/direction.rs deleted file mode 100644 index c2f0ddf..0000000 --- a/mesh_generated/src/models/direction.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// Direction : Used by RelatedTransaction to indicate the direction of the relation (i.e. cross-shard/cross-network sends may reference `backward` to an earlier transaction and async execution may reference `forward`). Can be used to indicate if a transaction relation is from child to parent or the reverse. -/// Used by RelatedTransaction to indicate the direction of the relation (i.e. cross-shard/cross-network sends may reference `backward` to an earlier transaction and async execution may reference `forward`). Can be used to indicate if a transaction relation is from child to parent or the reverse. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Direction { - #[serde(rename = "forward")] - Forward, - #[serde(rename = "backward")] - Backward, -} - -impl std::fmt::Display for Direction { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Forward => write!(f, "forward"), - Self::Backward => write!(f, "backward"), - } - } -} - -impl Default for Direction { - fn default() -> Direction { - Self::Forward - } -} diff --git a/mesh_generated/src/models/error.rs b/mesh_generated/src/models/error.rs deleted file mode 100644 index e6ee431..0000000 --- a/mesh_generated/src/models/error.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// Error : Instead of utilizing HTTP status codes to describe node errors (which often do not have a good analog), rich errors are returned using this object. Both the code and message fields can be individually used to correctly identify an error. Implementations MUST use unique values for both fields. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Error { - /// Code is a network-specific error code. If desired, this code can be equivalent to an HTTP status code. - #[serde(rename = "code")] - pub code: i32, - /// Message is a network-specific error message. The message MUST NOT change for a given code. In particular, this means that any contextual information should be included in the details field. - #[serde(rename = "message")] - pub message: String, - /// Description allows the implementer to optionally provide additional information about an error. In many cases, the content of this field will be a copy-and-paste from existing developer documentation. Description can ONLY be populated with generic information about a particular type of error. It MUST NOT be populated with information about a particular instantiation of an error (use `details` for this). Whereas the content of Error.Message should stay stable across releases, the content of Error.Description will likely change across releases (as implementers improve error documentation). For this reason, the content in this field is not part of any type assertion (unlike Error.Message). - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - /// An error is retriable if the same request may succeed if submitted again. - #[serde(rename = "retriable")] - pub retriable: bool, - /// Often times it is useful to return context specific to the request that caused the error (i.e. a sample of the stack trace or impacted account) in addition to the standard error message. - #[serde(rename = "details", skip_serializing_if = "Option::is_none")] - pub details: Option, -} - -impl Error { - /// Instead of utilizing HTTP status codes to describe node errors (which often do not have a good analog), rich errors are returned using this object. Both the code and message fields can be individually used to correctly identify an error. Implementations MUST use unique values for both fields. - pub fn new(code: i32, message: String, retriable: bool) -> Error { - Error { - code, - message, - description: None, - retriable, - details: None, - } - } -} diff --git a/mesh_generated/src/models/events_blocks_request.rs b/mesh_generated/src/models/events_blocks_request.rs deleted file mode 100644 index 733e363..0000000 --- a/mesh_generated/src/models/events_blocks_request.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// EventsBlocksRequest : EventsBlocksRequest is utilized to fetch a sequence of BlockEvents indicating which blocks were added and removed from storage to reach the current state. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EventsBlocksRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - /// offset is the offset into the event stream to sync events from. If this field is not populated, we return the limit events backwards from tip. If this is set to 0, we start from the beginning. - #[serde(rename = "offset", skip_serializing_if = "Option::is_none")] - pub offset: Option, - /// limit is the maximum number of events to fetch in one call. The implementation may return <= limit events. - #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] - pub limit: Option, -} - -impl EventsBlocksRequest { - /// EventsBlocksRequest is utilized to fetch a sequence of BlockEvents indicating which blocks were added and removed from storage to reach the current state. - pub fn new(network_identifier: models::NetworkIdentifier) -> EventsBlocksRequest { - EventsBlocksRequest { - network_identifier: Box::new(network_identifier), - offset: None, - limit: None, - } - } -} diff --git a/mesh_generated/src/models/events_blocks_response.rs b/mesh_generated/src/models/events_blocks_response.rs deleted file mode 100644 index ea5ab23..0000000 --- a/mesh_generated/src/models/events_blocks_response.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// EventsBlocksResponse : EventsBlocksResponse contains an ordered collection of BlockEvents and the max retrievable sequence. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EventsBlocksResponse { - /// max_sequence is the maximum available sequence number to fetch. - #[serde(rename = "max_sequence")] - pub max_sequence: i64, - /// events is an array of BlockEvents indicating the order to add and remove blocks to maintain a canonical view of blockchain state. Lightweight clients can use this event stream to update state without implementing their own block syncing logic. - #[serde(rename = "events")] - pub events: Vec, -} - -impl EventsBlocksResponse { - /// EventsBlocksResponse contains an ordered collection of BlockEvents and the max retrievable sequence. - pub fn new(max_sequence: i64, events: Vec) -> EventsBlocksResponse { - EventsBlocksResponse { max_sequence, events } - } -} diff --git a/mesh_generated/src/models/exemption_type.rs b/mesh_generated/src/models/exemption_type.rs deleted file mode 100644 index 339ed72..0000000 --- a/mesh_generated/src/models/exemption_type.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// ExemptionType : ExemptionType is used to indicate if the live balance for an account subject to a BalanceExemption could increase above, decrease below, or equal the computed balance. * greater_or_equal: The live balance may increase above or equal the computed balance. This typically occurs with staking rewards that accrue on each block. * less_or_equal: The live balance may decrease below or equal the computed balance. This typically occurs as balance moves from locked to spendable on a vesting account. * dynamic: The live balance may increase above, decrease below, or equal the computed balance. This typically occurs with tokens that have a dynamic supply. -/// ExemptionType is used to indicate if the live balance for an account subject to a BalanceExemption could increase above, decrease below, or equal the computed balance. * greater_or_equal: The live balance may increase above or equal the computed balance. This typically occurs with staking rewards that accrue on each block. * less_or_equal: The live balance may decrease below or equal the computed balance. This typically occurs as balance moves from locked to spendable on a vesting account. * dynamic: The live balance may increase above, decrease below, or equal the computed balance. This typically occurs with tokens that have a dynamic supply. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum ExemptionType { - #[serde(rename = "greater_or_equal")] - GreaterOrEqual, - #[serde(rename = "less_or_equal")] - LessOrEqual, - #[serde(rename = "dynamic")] - Dynamic, -} - -impl std::fmt::Display for ExemptionType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::GreaterOrEqual => write!(f, "greater_or_equal"), - Self::LessOrEqual => write!(f, "less_or_equal"), - Self::Dynamic => write!(f, "dynamic"), - } - } -} - -impl Default for ExemptionType { - fn default() -> ExemptionType { - Self::GreaterOrEqual - } -} diff --git a/mesh_generated/src/models/mempool_response.rs b/mesh_generated/src/models/mempool_response.rs deleted file mode 100644 index c9b134a..0000000 --- a/mesh_generated/src/models/mempool_response.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// MempoolResponse : A MempoolResponse contains all transaction identifiers in the mempool for a particular network_identifier. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MempoolResponse { - #[serde(rename = "transaction_identifiers")] - pub transaction_identifiers: Vec, -} - -impl MempoolResponse { - /// A MempoolResponse contains all transaction identifiers in the mempool for a particular network_identifier. - pub fn new(transaction_identifiers: Vec) -> MempoolResponse { - MempoolResponse { - transaction_identifiers, - } - } -} diff --git a/mesh_generated/src/models/mempool_transaction_request.rs b/mesh_generated/src/models/mempool_transaction_request.rs deleted file mode 100644 index b95ceed..0000000 --- a/mesh_generated/src/models/mempool_transaction_request.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// MempoolTransactionRequest : A MempoolTransactionRequest is utilized to retrieve a transaction from the mempool. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MempoolTransactionRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - #[serde(rename = "transaction_identifier")] - pub transaction_identifier: Box, -} - -impl MempoolTransactionRequest { - /// A MempoolTransactionRequest is utilized to retrieve a transaction from the mempool. - pub fn new( - network_identifier: models::NetworkIdentifier, - transaction_identifier: models::TransactionIdentifier, - ) -> MempoolTransactionRequest { - MempoolTransactionRequest { - network_identifier: Box::new(network_identifier), - transaction_identifier: Box::new(transaction_identifier), - } - } -} diff --git a/mesh_generated/src/models/mempool_transaction_response.rs b/mesh_generated/src/models/mempool_transaction_response.rs deleted file mode 100644 index 55116c3..0000000 --- a/mesh_generated/src/models/mempool_transaction_response.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// MempoolTransactionResponse : A MempoolTransactionResponse contains an estimate of a mempool transaction. It may not be possible to know the full impact of a transaction in the mempool (ex: fee paid). -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MempoolTransactionResponse { - #[serde(rename = "transaction")] - pub transaction: Box, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl MempoolTransactionResponse { - /// A MempoolTransactionResponse contains an estimate of a mempool transaction. It may not be possible to know the full impact of a transaction in the mempool (ex: fee paid). - pub fn new(transaction: models::Transaction) -> MempoolTransactionResponse { - MempoolTransactionResponse { - transaction: Box::new(transaction), - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/metadata_request.rs b/mesh_generated/src/models/metadata_request.rs deleted file mode 100644 index f55c3e7..0000000 --- a/mesh_generated/src/models/metadata_request.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// MetadataRequest : A MetadataRequest is utilized in any request where the only argument is optional metadata. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MetadataRequest { - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl MetadataRequest { - /// A MetadataRequest is utilized in any request where the only argument is optional metadata. - pub fn new() -> MetadataRequest { - MetadataRequest { metadata: None } - } -} diff --git a/mesh_generated/src/models/mod.rs b/mesh_generated/src/models/mod.rs deleted file mode 100644 index eddd86e..0000000 --- a/mesh_generated/src/models/mod.rs +++ /dev/null @@ -1,148 +0,0 @@ -pub mod account_balance_request; -pub use self::account_balance_request::AccountBalanceRequest; -pub mod account_balance_response; -pub use self::account_balance_response::AccountBalanceResponse; -pub mod account_coins_request; -pub use self::account_coins_request::AccountCoinsRequest; -pub mod account_coins_response; -pub use self::account_coins_response::AccountCoinsResponse; -pub mod account_identifier; -pub use self::account_identifier::AccountIdentifier; -pub mod allow; -pub use self::allow::Allow; -pub mod amount; -pub use self::amount::Amount; -pub mod balance_exemption; -pub use self::balance_exemption::BalanceExemption; -pub mod block; -pub use self::block::Block; -pub mod block_event; -pub use self::block_event::BlockEvent; -pub mod block_event_type; -pub use self::block_event_type::BlockEventType; -pub mod block_identifier; -pub use self::block_identifier::BlockIdentifier; -pub mod block_request; -pub use self::block_request::BlockRequest; -pub mod block_response; -pub use self::block_response::BlockResponse; -pub mod block_transaction; -pub use self::block_transaction::BlockTransaction; -pub mod block_transaction_request; -pub use self::block_transaction_request::BlockTransactionRequest; -pub mod block_transaction_response; -pub use self::block_transaction_response::BlockTransactionResponse; -pub mod call_request; -pub use self::call_request::CallRequest; -pub mod call_response; -pub use self::call_response::CallResponse; -pub mod case; -pub use self::case::Case; -pub mod coin; -pub use self::coin::Coin; -pub mod coin_action; -pub use self::coin_action::CoinAction; -pub mod coin_change; -pub use self::coin_change::CoinChange; -pub mod coin_identifier; -pub use self::coin_identifier::CoinIdentifier; -pub mod construction_combine_request; -pub use self::construction_combine_request::ConstructionCombineRequest; -pub mod construction_combine_response; -pub use self::construction_combine_response::ConstructionCombineResponse; -pub mod construction_derive_request; -pub use self::construction_derive_request::ConstructionDeriveRequest; -pub mod construction_derive_response; -pub use self::construction_derive_response::ConstructionDeriveResponse; -pub mod construction_hash_request; -pub use self::construction_hash_request::ConstructionHashRequest; -pub mod construction_metadata_request; -pub use self::construction_metadata_request::ConstructionMetadataRequest; -pub mod construction_metadata_response; -pub use self::construction_metadata_response::ConstructionMetadataResponse; -pub mod construction_parse_request; -pub use self::construction_parse_request::ConstructionParseRequest; -pub mod construction_parse_response; -pub use self::construction_parse_response::ConstructionParseResponse; -pub mod construction_payloads_request; -pub use self::construction_payloads_request::ConstructionPayloadsRequest; -pub mod construction_payloads_response; -pub use self::construction_payloads_response::ConstructionPayloadsResponse; -pub mod construction_preprocess_request; -pub use self::construction_preprocess_request::ConstructionPreprocessRequest; -pub mod construction_preprocess_response; -pub use self::construction_preprocess_response::ConstructionPreprocessResponse; -pub mod construction_submit_request; -pub use self::construction_submit_request::ConstructionSubmitRequest; -pub mod currency; -pub use self::currency::Currency; -pub mod curve_type; -pub use self::curve_type::CurveType; -pub mod direction; -pub use self::direction::Direction; -pub mod error; -pub use self::error::Error; -pub mod events_blocks_request; -pub use self::events_blocks_request::EventsBlocksRequest; -pub mod events_blocks_response; -pub use self::events_blocks_response::EventsBlocksResponse; -pub mod exemption_type; -pub use self::exemption_type::ExemptionType; -pub mod mempool_response; -pub use self::mempool_response::MempoolResponse; -pub mod mempool_transaction_request; -pub use self::mempool_transaction_request::MempoolTransactionRequest; -pub mod mempool_transaction_response; -pub use self::mempool_transaction_response::MempoolTransactionResponse; -pub mod metadata_request; -pub use self::metadata_request::MetadataRequest; -pub mod network_identifier; -pub use self::network_identifier::NetworkIdentifier; -pub mod network_list_response; -pub use self::network_list_response::NetworkListResponse; -pub mod network_options_response; -pub use self::network_options_response::NetworkOptionsResponse; -pub mod network_request; -pub use self::network_request::NetworkRequest; -pub mod network_status_response; -pub use self::network_status_response::NetworkStatusResponse; -pub mod operation; -pub use self::operation::Operation; -pub mod operation_identifier; -pub use self::operation_identifier::OperationIdentifier; -pub mod operation_status; -pub use self::operation_status::OperationStatus; -pub mod operator; -pub use self::operator::Operator; -pub mod partial_block_identifier; -pub use self::partial_block_identifier::PartialBlockIdentifier; -pub mod peer; -pub use self::peer::Peer; -pub mod public_key; -pub use self::public_key::PublicKey; -pub mod related_transaction; -pub use self::related_transaction::RelatedTransaction; -pub mod search_transactions_request; -pub use self::search_transactions_request::SearchTransactionsRequest; -pub mod search_transactions_response; -pub use self::search_transactions_response::SearchTransactionsResponse; -pub mod signature; -pub use self::signature::Signature; -pub mod signature_type; -pub use self::signature_type::SignatureType; -pub mod signing_payload; -pub use self::signing_payload::SigningPayload; -pub mod sub_account_identifier; -pub use self::sub_account_identifier::SubAccountIdentifier; -pub mod sub_network_identifier; -pub use self::sub_network_identifier::SubNetworkIdentifier; -pub mod sync_status; -pub use self::sync_status::SyncStatus; -pub mod transaction; -pub use self::transaction::Transaction; -pub mod transaction_identifier; -pub use self::transaction_identifier::TransactionIdentifier; -pub mod transaction_identifier_response; -pub use self::transaction_identifier_response::TransactionIdentifierResponse; -pub mod version; -pub use self::version::Version; diff --git a/mesh_generated/src/models/network_identifier.rs b/mesh_generated/src/models/network_identifier.rs deleted file mode 100644 index 999aefa..0000000 --- a/mesh_generated/src/models/network_identifier.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// NetworkIdentifier : The network_identifier specifies which network a particular object is associated with. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NetworkIdentifier { - #[serde(rename = "blockchain")] - pub blockchain: String, - /// If a blockchain has a specific chain-id or network identifier, it should go in this field. It is up to the client to determine which network-specific identifier is mainnet or testnet. - #[serde(rename = "network")] - pub network: String, - #[serde(rename = "sub_network_identifier", skip_serializing_if = "Option::is_none")] - pub sub_network_identifier: Option>, -} - -impl NetworkIdentifier { - /// The network_identifier specifies which network a particular object is associated with. - pub fn new(blockchain: String, network: String) -> NetworkIdentifier { - NetworkIdentifier { - blockchain, - network, - sub_network_identifier: None, - } - } -} diff --git a/mesh_generated/src/models/network_list_response.rs b/mesh_generated/src/models/network_list_response.rs deleted file mode 100644 index d32c525..0000000 --- a/mesh_generated/src/models/network_list_response.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// NetworkListResponse : A NetworkListResponse contains all NetworkIdentifiers that the node can serve information for. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NetworkListResponse { - #[serde(rename = "network_identifiers")] - pub network_identifiers: Vec, -} - -impl NetworkListResponse { - /// A NetworkListResponse contains all NetworkIdentifiers that the node can serve information for. - pub fn new(network_identifiers: Vec) -> NetworkListResponse { - NetworkListResponse { network_identifiers } - } -} diff --git a/mesh_generated/src/models/network_options_response.rs b/mesh_generated/src/models/network_options_response.rs deleted file mode 100644 index 654bc4b..0000000 --- a/mesh_generated/src/models/network_options_response.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// NetworkOptionsResponse : NetworkOptionsResponse contains information about the versioning of the node and the allowed operation statuses, operation types, and errors. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NetworkOptionsResponse { - #[serde(rename = "version")] - pub version: Box, - #[serde(rename = "allow")] - pub allow: Box, -} - -impl NetworkOptionsResponse { - /// NetworkOptionsResponse contains information about the versioning of the node and the allowed operation statuses, operation types, and errors. - pub fn new(version: models::Version, allow: models::Allow) -> NetworkOptionsResponse { - NetworkOptionsResponse { - version: Box::new(version), - allow: Box::new(allow), - } - } -} diff --git a/mesh_generated/src/models/network_request.rs b/mesh_generated/src/models/network_request.rs deleted file mode 100644 index 3623857..0000000 --- a/mesh_generated/src/models/network_request.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// NetworkRequest : A NetworkRequest is utilized to retrieve some data specific exclusively to a NetworkIdentifier. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NetworkRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl NetworkRequest { - /// A NetworkRequest is utilized to retrieve some data specific exclusively to a NetworkIdentifier. - pub fn new(network_identifier: models::NetworkIdentifier) -> NetworkRequest { - NetworkRequest { - network_identifier: Box::new(network_identifier), - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/network_status_response.rs b/mesh_generated/src/models/network_status_response.rs deleted file mode 100644 index f877fc2..0000000 --- a/mesh_generated/src/models/network_status_response.rs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// NetworkStatusResponse : NetworkStatusResponse contains basic information about the node's view of a blockchain network. It is assumed that any BlockIdentifier.Index less than or equal to CurrentBlockIdentifier.Index can be queried. If a Rosetta implementation prunes historical state, it should populate the optional `oldest_block_identifier` field with the oldest block available to query. If this is not populated, it is assumed that the `genesis_block_identifier` is the oldest queryable block. If a Rosetta implementation performs some pre-sync before it is possible to query blocks, sync_status should be populated so that clients can still monitor healthiness. Without this field, it may appear that the implementation is stuck syncing and needs to be terminated. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NetworkStatusResponse { - #[serde(rename = "current_block_identifier")] - pub current_block_identifier: Box, - /// The timestamp of the block in milliseconds since the Unix Epoch. The timestamp is stored in milliseconds because some blockchains produce blocks more often than once a second. - #[serde(rename = "current_block_timestamp")] - pub current_block_timestamp: i64, - #[serde(rename = "genesis_block_identifier")] - pub genesis_block_identifier: Box, - #[serde(rename = "oldest_block_identifier", skip_serializing_if = "Option::is_none")] - pub oldest_block_identifier: Option>, - #[serde(rename = "sync_status", skip_serializing_if = "Option::is_none")] - pub sync_status: Option>, - #[serde(rename = "peers", skip_serializing_if = "Option::is_none")] - pub peers: Option>, -} - -impl NetworkStatusResponse { - /// NetworkStatusResponse contains basic information about the node's view of a blockchain network. It is assumed that any BlockIdentifier.Index less than or equal to CurrentBlockIdentifier.Index can be queried. If a Rosetta implementation prunes historical state, it should populate the optional `oldest_block_identifier` field with the oldest block available to query. If this is not populated, it is assumed that the `genesis_block_identifier` is the oldest queryable block. If a Rosetta implementation performs some pre-sync before it is possible to query blocks, sync_status should be populated so that clients can still monitor healthiness. Without this field, it may appear that the implementation is stuck syncing and needs to be terminated. - pub fn new( - current_block_identifier: models::BlockIdentifier, - current_block_timestamp: i64, - genesis_block_identifier: models::BlockIdentifier, - ) -> NetworkStatusResponse { - NetworkStatusResponse { - current_block_identifier: Box::new(current_block_identifier), - current_block_timestamp, - genesis_block_identifier: Box::new(genesis_block_identifier), - oldest_block_identifier: None, - sync_status: None, - peers: None, - } - } -} diff --git a/mesh_generated/src/models/operation.rs b/mesh_generated/src/models/operation.rs deleted file mode 100644 index 3bd5999..0000000 --- a/mesh_generated/src/models/operation.rs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// Operation : Operations contain all balance-changing information within a transaction. They are always one-sided (only affect 1 AccountIdentifier) and can succeed or fail independently from a Transaction. Operations are used both to represent on-chain data (Data API) and to construct new transactions (Construction API), creating a standard interface for reading and writing to blockchains. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Operation { - #[serde(rename = "operation_identifier")] - pub operation_identifier: Box, - /// Restrict referenced related_operations to identifier indices < the current operation_identifier.index. This ensures there exists a clear DAG-structure of relations. Since operations are one-sided, one could imagine relating operations in a single transfer or linking operations in a call tree. - #[serde(rename = "related_operations", skip_serializing_if = "Option::is_none")] - pub related_operations: Option>, - /// Type is the network-specific type of the operation. Ensure that any type that can be returned here is also specified in the NetworkOptionsResponse. This can be very useful to downstream consumers that parse all block data. - #[serde(rename = "type")] - pub r#type: String, - /// Status is the network-specific status of the operation. Status is not defined on the transaction object because blockchains with smart contracts may have transactions that partially apply (some operations are successful and some are not). Blockchains with atomic transactions (all operations succeed or all operations fail) will have the same status for each operation. On-chain operations (operations retrieved in the `/block` and `/block/transaction` endpoints) MUST have a populated status field (anything on-chain must have succeeded or failed). However, operations provided during transaction construction (often times called \"intent\" in the documentation) MUST NOT have a populated status field (operations yet to be included on-chain have not yet succeeded or failed). - #[serde(rename = "status", skip_serializing_if = "Option::is_none")] - pub status: Option, - #[serde(rename = "account", skip_serializing_if = "Option::is_none")] - pub account: Option>, - #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] - pub amount: Option>, - #[serde(rename = "coin_change", skip_serializing_if = "Option::is_none")] - pub coin_change: Option>, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl Operation { - /// Operations contain all balance-changing information within a transaction. They are always one-sided (only affect 1 AccountIdentifier) and can succeed or fail independently from a Transaction. Operations are used both to represent on-chain data (Data API) and to construct new transactions (Construction API), creating a standard interface for reading and writing to blockchains. - pub fn new(operation_identifier: models::OperationIdentifier, r#type: String) -> Operation { - Operation { - operation_identifier: Box::new(operation_identifier), - related_operations: None, - r#type, - status: None, - account: None, - amount: None, - coin_change: None, - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/operation_identifier.rs b/mesh_generated/src/models/operation_identifier.rs deleted file mode 100644 index 47e6590..0000000 --- a/mesh_generated/src/models/operation_identifier.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// OperationIdentifier : The operation_identifier uniquely identifies an operation within a transaction. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OperationIdentifier { - /// The operation index is used to ensure each operation has a unique identifier within a transaction. This index is only relative to the transaction and NOT GLOBAL. The operations in each transaction should start from index 0. To clarify, there may not be any notion of an operation index in the blockchain being described. - #[serde(rename = "index")] - pub index: i64, - /// Some blockchains specify an operation index that is essential for client use. For example, Bitcoin uses a network_index to identify which UTXO was used in a transaction. network_index should not be populated if there is no notion of an operation index in a blockchain (typically most account-based blockchains). - #[serde(rename = "network_index", skip_serializing_if = "Option::is_none")] - pub network_index: Option, -} - -impl OperationIdentifier { - /// The operation_identifier uniquely identifies an operation within a transaction. - pub fn new(index: i64) -> OperationIdentifier { - OperationIdentifier { - index, - network_index: None, - } - } -} diff --git a/mesh_generated/src/models/operation_status.rs b/mesh_generated/src/models/operation_status.rs deleted file mode 100644 index 4e3ccff..0000000 --- a/mesh_generated/src/models/operation_status.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// OperationStatus : OperationStatus is utilized to indicate which Operation status are considered successful. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OperationStatus { - /// The status is the network-specific status of the operation. - #[serde(rename = "status")] - pub status: String, - /// An Operation is considered successful if the Operation.Amount should affect the Operation.Account. Some blockchains (like Bitcoin) only include successful operations in blocks but other blockchains (like Ethereum) include unsuccessful operations that incur a fee. To reconcile the computed balance from the stream of Operations, it is critical to understand which Operation.Status indicate an Operation is successful and should affect an Account. - #[serde(rename = "successful")] - pub successful: bool, -} - -impl OperationStatus { - /// OperationStatus is utilized to indicate which Operation status are considered successful. - pub fn new(status: String, successful: bool) -> OperationStatus { - OperationStatus { status, successful } - } -} diff --git a/mesh_generated/src/models/operator.rs b/mesh_generated/src/models/operator.rs deleted file mode 100644 index 45fcd91..0000000 --- a/mesh_generated/src/models/operator.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// Operator : Operator is used by query-related endpoints to determine how to apply conditions. If this field is not populated, the default `and` value will be used. -/// Operator is used by query-related endpoints to determine how to apply conditions. If this field is not populated, the default `and` value will be used. -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Operator { - #[serde(rename = "or")] - Or, - #[serde(rename = "and")] - And, -} - -impl std::fmt::Display for Operator { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Or => write!(f, "or"), - Self::And => write!(f, "and"), - } - } -} - -impl Default for Operator { - fn default() -> Operator { - Self::Or - } -} diff --git a/mesh_generated/src/models/partial_block_identifier.rs b/mesh_generated/src/models/partial_block_identifier.rs deleted file mode 100644 index 0c3f8e7..0000000 --- a/mesh_generated/src/models/partial_block_identifier.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// PartialBlockIdentifier : When fetching data by BlockIdentifier, it may be possible to only specify the index or hash. If neither property is specified, it is assumed that the client is making a request at the current block. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PartialBlockIdentifier { - #[serde(rename = "index", skip_serializing_if = "Option::is_none")] - pub index: Option, - #[serde(rename = "hash", skip_serializing_if = "Option::is_none")] - pub hash: Option, -} - -impl PartialBlockIdentifier { - /// When fetching data by BlockIdentifier, it may be possible to only specify the index or hash. If neither property is specified, it is assumed that the client is making a request at the current block. - pub fn new() -> PartialBlockIdentifier { - PartialBlockIdentifier { - index: None, - hash: None, - } - } -} diff --git a/mesh_generated/src/models/peer.rs b/mesh_generated/src/models/peer.rs deleted file mode 100644 index 0981462..0000000 --- a/mesh_generated/src/models/peer.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// Peer : A Peer is a representation of a node's peer. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Peer { - #[serde(rename = "peer_id")] - pub peer_id: String, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl Peer { - /// A Peer is a representation of a node's peer. - pub fn new(peer_id: String) -> Peer { - Peer { - peer_id, - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/public_key.rs b/mesh_generated/src/models/public_key.rs deleted file mode 100644 index b3429e2..0000000 --- a/mesh_generated/src/models/public_key.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// PublicKey : PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct PublicKey { - /// Hex-encoded public key bytes in the format specified by the CurveType. - #[serde(rename = "hex_bytes")] - pub hex_bytes: String, - #[serde(rename = "curve_type")] - pub curve_type: models::CurveType, -} - -impl PublicKey { - /// PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation. - pub fn new(hex_bytes: String, curve_type: models::CurveType) -> PublicKey { - PublicKey { hex_bytes, curve_type } - } -} diff --git a/mesh_generated/src/models/related_transaction.rs b/mesh_generated/src/models/related_transaction.rs deleted file mode 100644 index 29d86ae..0000000 --- a/mesh_generated/src/models/related_transaction.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// RelatedTransaction : The related_transaction allows implementations to link together multiple transactions. An unpopulated network identifier indicates that the related transaction is on the same network. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct RelatedTransaction { - #[serde(rename = "network_identifier", skip_serializing_if = "Option::is_none")] - pub network_identifier: Option>, - #[serde(rename = "transaction_identifier")] - pub transaction_identifier: Box, - #[serde(rename = "direction")] - pub direction: models::Direction, -} - -impl RelatedTransaction { - /// The related_transaction allows implementations to link together multiple transactions. An unpopulated network identifier indicates that the related transaction is on the same network. - pub fn new( - transaction_identifier: models::TransactionIdentifier, - direction: models::Direction, - ) -> RelatedTransaction { - RelatedTransaction { - network_identifier: None, - transaction_identifier: Box::new(transaction_identifier), - direction, - } - } -} diff --git a/mesh_generated/src/models/search_transactions_request.rs b/mesh_generated/src/models/search_transactions_request.rs deleted file mode 100644 index 8b60b7a..0000000 --- a/mesh_generated/src/models/search_transactions_request.rs +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// SearchTransactionsRequest : SearchTransactionsRequest is used to search for transactions matching a set of provided conditions in canonical blocks. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SearchTransactionsRequest { - #[serde(rename = "network_identifier")] - pub network_identifier: Box, - #[serde(rename = "operator", skip_serializing_if = "Option::is_none")] - pub operator: Option, - /// max_block is the largest block index to consider when searching for transactions. If this field is not populated, the current block is considered the max_block. If you do not specify a max_block, it is possible a newly synced block will interfere with paginated transaction queries (as the offset could become invalid with newly added rows). - #[serde(rename = "max_block", skip_serializing_if = "Option::is_none")] - pub max_block: Option, - /// offset is the offset into the query result to start returning transactions. If any search conditions are changed, the query offset will change and you must restart your search iteration. - #[serde(rename = "offset", skip_serializing_if = "Option::is_none")] - pub offset: Option, - /// limit is the maximum number of transactions to return in one call. The implementation may return <= limit transactions. - #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] - pub limit: Option, - #[serde(rename = "transaction_identifier", skip_serializing_if = "Option::is_none")] - pub transaction_identifier: Option>, - #[serde(rename = "account_identifier", skip_serializing_if = "Option::is_none")] - pub account_identifier: Option>, - #[serde(rename = "coin_identifier", skip_serializing_if = "Option::is_none")] - pub coin_identifier: Option>, - #[serde(rename = "currency", skip_serializing_if = "Option::is_none")] - pub currency: Option>, - /// status is the network-specific operation type. - #[serde(rename = "status", skip_serializing_if = "Option::is_none")] - pub status: Option, - /// type is the network-specific operation type. - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - /// address is AccountIdentifier.Address. This is used to get all transactions related to an AccountIdentifier.Address, regardless of SubAccountIdentifier. - #[serde(rename = "address", skip_serializing_if = "Option::is_none")] - pub address: Option, - /// success is a synthetic condition populated by parsing network-specific operation statuses (using the mapping provided in `/network/options`). - #[serde(rename = "success", skip_serializing_if = "Option::is_none")] - pub success: Option, -} - -impl SearchTransactionsRequest { - /// SearchTransactionsRequest is used to search for transactions matching a set of provided conditions in canonical blocks. - pub fn new(network_identifier: models::NetworkIdentifier) -> SearchTransactionsRequest { - SearchTransactionsRequest { - network_identifier: Box::new(network_identifier), - operator: None, - max_block: None, - offset: None, - limit: None, - transaction_identifier: None, - account_identifier: None, - coin_identifier: None, - currency: None, - status: None, - r#type: None, - address: None, - success: None, - } - } -} diff --git a/mesh_generated/src/models/search_transactions_response.rs b/mesh_generated/src/models/search_transactions_response.rs deleted file mode 100644 index f06582f..0000000 --- a/mesh_generated/src/models/search_transactions_response.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// SearchTransactionsResponse : SearchTransactionsResponse contains an ordered collection of BlockTransactions that match the query in SearchTransactionsRequest. These BlockTransactions are sorted from most recent block to oldest block. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SearchTransactionsResponse { - /// transactions is an array of BlockTransactions sorted by most recent BlockIdentifier (meaning that transactions in recent blocks appear first). If there are many transactions for a particular search, transactions may not contain all matching transactions. It is up to the caller to paginate these transactions using the max_block field. - #[serde(rename = "transactions")] - pub transactions: Vec, - /// total_count is the number of results for a given search. Callers typically use this value to concurrently fetch results by offset or to display a virtual page number associated with results. - #[serde(rename = "total_count")] - pub total_count: i64, - /// next_offset is the next offset to use when paginating through transaction results. If this field is not populated, there are no more transactions to query. - #[serde(rename = "next_offset", skip_serializing_if = "Option::is_none")] - pub next_offset: Option, -} - -impl SearchTransactionsResponse { - /// SearchTransactionsResponse contains an ordered collection of BlockTransactions that match the query in SearchTransactionsRequest. These BlockTransactions are sorted from most recent block to oldest block. - pub fn new(transactions: Vec, total_count: i64) -> SearchTransactionsResponse { - SearchTransactionsResponse { - transactions, - total_count, - next_offset: None, - } - } -} diff --git a/mesh_generated/src/models/signature.rs b/mesh_generated/src/models/signature.rs deleted file mode 100644 index 4fe584f..0000000 --- a/mesh_generated/src/models/signature.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// Signature : Signature contains the payload that was signed, the public keys of the keypairs used to produce the signature, the signature (encoded in hex), and the SignatureType. PublicKey is often times not known during construction of the signing payloads but may be needed to combine signatures properly. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Signature { - #[serde(rename = "signing_payload")] - pub signing_payload: Box, - #[serde(rename = "public_key")] - pub public_key: Box, - #[serde(rename = "signature_type")] - pub signature_type: models::SignatureType, - #[serde(rename = "hex_bytes")] - pub hex_bytes: String, -} - -impl Signature { - /// Signature contains the payload that was signed, the public keys of the keypairs used to produce the signature, the signature (encoded in hex), and the SignatureType. PublicKey is often times not known during construction of the signing payloads but may be needed to combine signatures properly. - pub fn new( - signing_payload: models::SigningPayload, - public_key: models::PublicKey, - signature_type: models::SignatureType, - hex_bytes: String, - ) -> Signature { - Signature { - signing_payload: Box::new(signing_payload), - public_key: Box::new(public_key), - signature_type, - hex_bytes, - } - } -} diff --git a/mesh_generated/src/models/signature_type.rs b/mesh_generated/src/models/signature_type.rs deleted file mode 100644 index 77466cb..0000000 --- a/mesh_generated/src/models/signature_type.rs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// SignatureType : SignatureType is the type of a cryptographic signature. * ecdsa: `r (32-bytes) || s (32-bytes)` - `64 bytes` * ecdsa_recovery: `r (32-bytes) || s (32-bytes) || v (1-byte)` - `65 bytes` * ed25519: `R (32-byte) || s (32-bytes)` - `64 bytes` * schnorr_1: `r (32-bytes) || s (32-bytes)` - `64 bytes` (schnorr signature implemented by Zilliqa where both `r` and `s` are scalars encoded as `32-bytes` values, most significant byte first.) * schnorr_bip340: `r (32-bytes) || s (32-bytes)` - `64 bytes` (sig = (bytes(R) || bytes((k + ed) mod n) where `r` is the `X` coordinate of a point `R` whose `Y` coordinate is even, most significant bytes first.) * schnorr_poseidon: `r (32-bytes) || s (32-bytes)` where s = Hash(1st pk || 2nd pk || r) - `64 bytes` (schnorr signature w/ Poseidon hash function implemented by O(1) Labs where both `r` and `s` are scalars encoded as `32-bytes` values, least significant byte first. https://github.com/CodaProtocol/signer-reference/blob/master/schnorr.ml ) -/// SignatureType is the type of a cryptographic signature. * ecdsa: `r (32-bytes) || s (32-bytes)` - `64 bytes` * ecdsa_recovery: `r (32-bytes) || s (32-bytes) || v (1-byte)` - `65 bytes` * ed25519: `R (32-byte) || s (32-bytes)` - `64 bytes` * schnorr_1: `r (32-bytes) || s (32-bytes)` - `64 bytes` (schnorr signature implemented by Zilliqa where both `r` and `s` are scalars encoded as `32-bytes` values, most significant byte first.) * schnorr_bip340: `r (32-bytes) || s (32-bytes)` - `64 bytes` (sig = (bytes(R) || bytes((k + ed) mod n) where `r` is the `X` coordinate of a point `R` whose `Y` coordinate is even, most significant bytes first.) * schnorr_poseidon: `r (32-bytes) || s (32-bytes)` where s = Hash(1st pk || 2nd pk || r) - `64 bytes` (schnorr signature w/ Poseidon hash function implemented by O(1) Labs where both `r` and `s` are scalars encoded as `32-bytes` values, least significant byte first. https://github.com/CodaProtocol/signer-reference/blob/master/schnorr.ml ) -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum SignatureType { - #[serde(rename = "ecdsa")] - Ecdsa, - #[serde(rename = "ecdsa_recovery")] - EcdsaRecovery, - #[serde(rename = "ed25519")] - Ed25519, - #[serde(rename = "schnorr_1")] - Schnorr1, - #[serde(rename = "schnorr_bip340")] - SchnorrBip340, - #[serde(rename = "schnorr_poseidon")] - SchnorrPoseidon, -} - -impl std::fmt::Display for SignatureType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - match self { - Self::Ecdsa => write!(f, "ecdsa"), - Self::EcdsaRecovery => write!(f, "ecdsa_recovery"), - Self::Ed25519 => write!(f, "ed25519"), - Self::Schnorr1 => write!(f, "schnorr_1"), - Self::SchnorrBip340 => write!(f, "schnorr_bip340"), - Self::SchnorrPoseidon => write!(f, "schnorr_poseidon"), - } - } -} - -impl Default for SignatureType { - fn default() -> SignatureType { - Self::Ecdsa - } -} diff --git a/mesh_generated/src/models/signing_payload.rs b/mesh_generated/src/models/signing_payload.rs deleted file mode 100644 index f2091fe..0000000 --- a/mesh_generated/src/models/signing_payload.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// SigningPayload : SigningPayload is signed by the client with the keypair associated with an AccountIdentifier using the specified SignatureType. SignatureType can be optionally populated if there is a restriction on the signature scheme that can be used to sign the payload. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SigningPayload { - /// [DEPRECATED by `account_identifier` in `v1.4.4`] The network-specific address of the account that should sign the payload. - #[serde(rename = "address", skip_serializing_if = "Option::is_none")] - pub address: Option, - #[serde(rename = "account_identifier", skip_serializing_if = "Option::is_none")] - pub account_identifier: Option>, - /// Hex-encoded string of the payload bytes. - #[serde(rename = "hex_bytes")] - pub hex_bytes: String, - #[serde(rename = "signature_type", skip_serializing_if = "Option::is_none")] - pub signature_type: Option, -} - -impl SigningPayload { - /// SigningPayload is signed by the client with the keypair associated with an AccountIdentifier using the specified SignatureType. SignatureType can be optionally populated if there is a restriction on the signature scheme that can be used to sign the payload. - pub fn new(hex_bytes: String) -> SigningPayload { - SigningPayload { - address: None, - account_identifier: None, - hex_bytes, - signature_type: None, - } - } -} diff --git a/mesh_generated/src/models/sub_account_identifier.rs b/mesh_generated/src/models/sub_account_identifier.rs deleted file mode 100644 index 4a7a52d..0000000 --- a/mesh_generated/src/models/sub_account_identifier.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// SubAccountIdentifier : An account may have state specific to a contract address (ERC-20 token) and/or a stake (delegated balance). The sub_account_identifier should specify which state (if applicable) an account instantiation refers to. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SubAccountIdentifier { - /// The SubAccount address may be a cryptographic value or some other identifier (ex: bonded) that uniquely specifies a SubAccount. - #[serde(rename = "address")] - pub address: String, - /// If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients. - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl SubAccountIdentifier { - /// An account may have state specific to a contract address (ERC-20 token) and/or a stake (delegated balance). The sub_account_identifier should specify which state (if applicable) an account instantiation refers to. - pub fn new(address: String) -> SubAccountIdentifier { - SubAccountIdentifier { - address, - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/sub_network_identifier.rs b/mesh_generated/src/models/sub_network_identifier.rs deleted file mode 100644 index 407fd9f..0000000 --- a/mesh_generated/src/models/sub_network_identifier.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// SubNetworkIdentifier : In blockchains with sharded state, the SubNetworkIdentifier is required to query some object on a specific shard. This identifier is optional for all non-sharded blockchains. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SubNetworkIdentifier { - #[serde(rename = "network")] - pub network: String, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl SubNetworkIdentifier { - /// In blockchains with sharded state, the SubNetworkIdentifier is required to query some object on a specific shard. This identifier is optional for all non-sharded blockchains. - pub fn new(network: String) -> SubNetworkIdentifier { - SubNetworkIdentifier { - network, - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/sync_status.rs b/mesh_generated/src/models/sync_status.rs deleted file mode 100644 index a40debe..0000000 --- a/mesh_generated/src/models/sync_status.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// SyncStatus : SyncStatus is used to provide additional context about an implementation's sync status. This object is often used by implementations to indicate healthiness when block data cannot be queried until some sync phase completes or cannot be determined by comparing the timestamp of the most recent block with the current time. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SyncStatus { - /// CurrentIndex is the index of the last synced block in the current stage. This is a separate field from current_block_identifier in NetworkStatusResponse because blocks with indices up to and including the current_index may not yet be queryable by the caller. To reiterate, all indices up to and including current_block_identifier in NetworkStatusResponse must be queryable via the /block endpoint (excluding indices less than oldest_block_identifier). - #[serde(rename = "current_index", skip_serializing_if = "Option::is_none")] - pub current_index: Option, - /// TargetIndex is the index of the block that the implementation is attempting to sync to in the current stage. - #[serde(rename = "target_index", skip_serializing_if = "Option::is_none")] - pub target_index: Option, - /// Stage is the phase of the sync process. - #[serde(rename = "stage", skip_serializing_if = "Option::is_none")] - pub stage: Option, - /// synced is a boolean that indicates if an implementation has synced up to the most recent block. If this field is not populated, the caller should rely on a traditional tip timestamp comparison to determine if an implementation is synced. This field is particularly useful for quiescent blockchains (blocks only produced when there are pending transactions). In these blockchains, the most recent block could have a timestamp far behind the current time but the node could be healthy and at tip. - #[serde(rename = "synced", skip_serializing_if = "Option::is_none")] - pub synced: Option, -} - -impl SyncStatus { - /// SyncStatus is used to provide additional context about an implementation's sync status. This object is often used by implementations to indicate healthiness when block data cannot be queried until some sync phase completes or cannot be determined by comparing the timestamp of the most recent block with the current time. - pub fn new() -> SyncStatus { - SyncStatus { - current_index: None, - target_index: None, - stage: None, - synced: None, - } - } -} diff --git a/mesh_generated/src/models/transaction.rs b/mesh_generated/src/models/transaction.rs deleted file mode 100644 index 34e9bb7..0000000 --- a/mesh_generated/src/models/transaction.rs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// Transaction : Transactions contain an array of Operations that are attributable to the same TransactionIdentifier. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Transaction { - #[serde(rename = "transaction_identifier")] - pub transaction_identifier: Box, - #[serde(rename = "operations")] - pub operations: Vec, - #[serde(rename = "related_transactions", skip_serializing_if = "Option::is_none")] - pub related_transactions: Option>, - /// Transactions that are related to other transactions (like a cross-shard transaction) should include the tranaction_identifier of these transactions in the metadata. - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl Transaction { - /// Transactions contain an array of Operations that are attributable to the same TransactionIdentifier. - pub fn new(transaction_identifier: models::TransactionIdentifier, operations: Vec) -> Transaction { - Transaction { - transaction_identifier: Box::new(transaction_identifier), - operations, - related_transactions: None, - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/transaction_identifier.rs b/mesh_generated/src/models/transaction_identifier.rs deleted file mode 100644 index 9c4a731..0000000 --- a/mesh_generated/src/models/transaction_identifier.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// TransactionIdentifier : The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TransactionIdentifier { - /// Any transactions that are attributable only to a block (ex: a block event) should use the hash of the block as the identifier. This should be normalized according to the case specified in the transaction_hash_case in network options. - #[serde(rename = "hash")] - pub hash: String, -} - -impl TransactionIdentifier { - /// The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool. - pub fn new(hash: String) -> TransactionIdentifier { - TransactionIdentifier { hash } - } -} diff --git a/mesh_generated/src/models/transaction_identifier_response.rs b/mesh_generated/src/models/transaction_identifier_response.rs deleted file mode 100644 index 6f683a7..0000000 --- a/mesh_generated/src/models/transaction_identifier_response.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// TransactionIdentifierResponse : TransactionIdentifierResponse contains the transaction_identifier of a transaction that was submitted to either `/construction/hash` or `/construction/submit`. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TransactionIdentifierResponse { - #[serde(rename = "transaction_identifier")] - pub transaction_identifier: Box, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl TransactionIdentifierResponse { - /// TransactionIdentifierResponse contains the transaction_identifier of a transaction that was submitted to either `/construction/hash` or `/construction/submit`. - pub fn new(transaction_identifier: models::TransactionIdentifier) -> TransactionIdentifierResponse { - TransactionIdentifierResponse { - transaction_identifier: Box::new(transaction_identifier), - metadata: None, - } - } -} diff --git a/mesh_generated/src/models/version.rs b/mesh_generated/src/models/version.rs deleted file mode 100644 index 63d574c..0000000 --- a/mesh_generated/src/models/version.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Rosetta - * - * Build Once. Integrate Your Blockchain Everywhere. - * - * The version of the OpenAPI document: 1.4.13 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::Deserialize; -use serde::Serialize; - -/// Version : The Version object is utilized to inform the client of the versions of different components of the Rosetta implementation. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Version { - /// The rosetta_version is the version of the Rosetta interface the implementation adheres to. This can be useful for clients looking to reliably parse responses. - #[serde(rename = "rosetta_version")] - pub rosetta_version: String, - /// The node_version is the canonical version of the node runtime. This can help clients manage deployments. - #[serde(rename = "node_version")] - pub node_version: String, - /// When a middleware server is used to adhere to the Rosetta interface, it should return its version here. This can help clients manage deployments. - #[serde(rename = "middleware_version", skip_serializing_if = "Option::is_none")] - pub middleware_version: Option, - /// Any other information that may be useful about versioning of dependent services should be returned here. - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, -} - -impl Version { - /// The Version object is utilized to inform the client of the versions of different components of the Rosetta implementation. - pub fn new(rosetta_version: String, node_version: String) -> Version { - Version { - rosetta_version, - node_version, - middleware_version: None, - metadata: None, - } - } -} diff --git a/rustfmt.toml b/rustfmt.toml index 2883285..da10083 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,6 +1,5 @@ edition = "2021" group_imports = "StdExternalCrate" -ignore = ["mesh_generated/src/**"] imports_granularity = "Crate" max_width = 120 newline_style = "Unix" diff --git a/src/api/account_balance.rs b/src/api/account_balance.rs index 9386c80..9179d32 100644 --- a/src/api/account_balance.rs +++ b/src/api/account_balance.rs @@ -1,8 +1,8 @@ -use cynic::QueryBuilder; -use mesh::models::{ +use coinbase_mesh::models::{ AccountBalanceRequest, AccountBalanceResponse, AccountIdentifier, Amount, BlockIdentifier, Currency, PartialBlockIdentifier, }; +use cynic::QueryBuilder; use crate::{ graphql::{Account, AnnotatedBalance, Balance, Length, QueryBalance, QueryBalanceVariables, StateHash}, diff --git a/src/api/block.rs b/src/api/block.rs index d96e3a0..efd1673 100644 --- a/src/api/block.rs +++ b/src/api/block.rs @@ -1,9 +1,9 @@ use anyhow::Result; -use convert_case::{Case, Casing}; -use mesh::models::{ +use coinbase_mesh::models::{ AccountIdentifier, Amount, Block, BlockIdentifier, BlockRequest, BlockResponse, Currency, Operation, OperationIdentifier, PartialBlockIdentifier, Transaction, TransactionIdentifier, }; +use convert_case::{Case, Casing}; use serde::Serialize; use sqlx::FromRow; diff --git a/src/api/call.rs b/src/api/call.rs index 52fed7d..026acdf 100644 --- a/src/api/call.rs +++ b/src/api/call.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use mesh::models::{CallRequest, CallResponse}; +use coinbase_mesh::models::{CallRequest, CallResponse}; use crate::MinaMesh; diff --git a/src/api/construction_combine.rs b/src/api/construction_combine.rs index 318e95c..81b396d 100644 --- a/src/api/construction_combine.rs +++ b/src/api/construction_combine.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use mesh::models::{ConstructionCombineRequest, ConstructionCombineResponse}; +use coinbase_mesh::models::{ConstructionCombineRequest, ConstructionCombineResponse}; use crate::MinaMesh; diff --git a/src/api/construction_derive.rs b/src/api/construction_derive.rs index c92ebf5..3fde29f 100644 --- a/src/api/construction_derive.rs +++ b/src/api/construction_derive.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use mesh::models::{ConstructionDeriveRequest, ConstructionDeriveResponse}; +use coinbase_mesh::models::{ConstructionDeriveRequest, ConstructionDeriveResponse}; use crate::MinaMesh; diff --git a/src/api/construction_hash.rs b/src/api/construction_hash.rs index d1f4438..b2f537d 100644 --- a/src/api/construction_hash.rs +++ b/src/api/construction_hash.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use mesh::models::{ConstructionHashRequest, TransactionIdentifier}; +use coinbase_mesh::models::{ConstructionHashRequest, TransactionIdentifier}; use crate::MinaMesh; diff --git a/src/api/construction_metadata.rs b/src/api/construction_metadata.rs index a6e07c0..e95171d 100644 --- a/src/api/construction_metadata.rs +++ b/src/api/construction_metadata.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use mesh::models::{ConstructionMetadataRequest, ConstructionMetadataResponse}; +use coinbase_mesh::models::{ConstructionMetadataRequest, ConstructionMetadataResponse}; use crate::MinaMesh; diff --git a/src/api/construction_parse.rs b/src/api/construction_parse.rs index 30e59f3..8060c41 100644 --- a/src/api/construction_parse.rs +++ b/src/api/construction_parse.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use mesh::models::{ConstructionParseRequest, ConstructionParseResponse}; +use coinbase_mesh::models::{ConstructionParseRequest, ConstructionParseResponse}; use crate::MinaMesh; diff --git a/src/api/construction_payloads.rs b/src/api/construction_payloads.rs index ffba914..60cea97 100644 --- a/src/api/construction_payloads.rs +++ b/src/api/construction_payloads.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use mesh::models::{ConstructionPayloadsRequest, ConstructionPayloadsResponse}; +use coinbase_mesh::models::{ConstructionPayloadsRequest, ConstructionPayloadsResponse}; use crate::MinaMesh; diff --git a/src/api/construction_preprocess.rs b/src/api/construction_preprocess.rs index 0f3e443..606ef77 100644 --- a/src/api/construction_preprocess.rs +++ b/src/api/construction_preprocess.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use mesh::models::{ConstructionPreprocessRequest, ConstructionPreprocessResponse}; +use coinbase_mesh::models::{ConstructionPreprocessRequest, ConstructionPreprocessResponse}; use crate::MinaMesh; diff --git a/src/api/construction_submit.rs b/src/api/construction_submit.rs index e700599..26ea93c 100644 --- a/src/api/construction_submit.rs +++ b/src/api/construction_submit.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use mesh::models::{ConstructionSubmitRequest, TransactionIdentifier}; +use coinbase_mesh::models::{ConstructionSubmitRequest, TransactionIdentifier}; use crate::MinaMesh; diff --git a/src/api/mempool.rs b/src/api/mempool.rs index 519d413..256c85a 100644 --- a/src/api/mempool.rs +++ b/src/api/mempool.rs @@ -3,8 +3,8 @@ #![allow(clippy::just_underscores_and_digits)] use anyhow::Result; +use coinbase_mesh::models::{MempoolResponse, TransactionIdentifier}; use cynic::QueryBuilder; -use mesh::models::{MempoolResponse, TransactionIdentifier}; use crate::{graphql::QueryMempool, MinaMesh}; diff --git a/src/api/mempool_transaction.rs b/src/api/mempool_transaction.rs index f9f4de0..f59da2a 100644 --- a/src/api/mempool_transaction.rs +++ b/src/api/mempool_transaction.rs @@ -1,5 +1,7 @@ +use coinbase_mesh::models::{ + MempoolTransactionRequest, MempoolTransactionResponse, Transaction, TransactionIdentifier, +}; use cynic::QueryBuilder; -use mesh::models::{MempoolTransactionRequest, MempoolTransactionResponse, Transaction, TransactionIdentifier}; use crate::{ graphql::{QueryMempoolTransactions, QueryMempoolTransactionsVariables}, diff --git a/src/api/network_health_check.rs b/src/api/network_health_check.rs index e5caa90..fdf3d88 100644 --- a/src/api/network_health_check.rs +++ b/src/api/network_health_check.rs @@ -1,6 +1,6 @@ use anyhow::Result; +use coinbase_mesh::models::NetworkIdentifier; use cynic::QueryBuilder; -use mesh::models::NetworkIdentifier; use crate::{graphql::QueryNetworkId, MinaMesh}; diff --git a/src/api/network_list.rs b/src/api/network_list.rs index 1c0f8f1..4148cb0 100644 --- a/src/api/network_list.rs +++ b/src/api/network_list.rs @@ -1,6 +1,6 @@ use anyhow::Result; +use coinbase_mesh::models::{NetworkIdentifier, NetworkListResponse}; use cynic::QueryBuilder; -use mesh::models::{NetworkIdentifier, NetworkListResponse}; use crate::{graphql::QueryNetworkId, MinaMesh}; diff --git a/src/api/network_options.rs b/src/api/network_options.rs index 18e2a6a..ed8c026 100644 --- a/src/api/network_options.rs +++ b/src/api/network_options.rs @@ -1,7 +1,7 @@ // TODO: double-check the data is correct // TODO: why do long string literals in the error metadata break rustfmt? -use mesh::models::{Allow, Case, Error, NetworkOptionsResponse, OperationStatus, Version}; +use coinbase_mesh::models::{Allow, Case, Error, NetworkOptionsResponse, OperationStatus, Version}; use crate::{MinaMesh, MinaMeshError}; diff --git a/src/api/network_status.rs b/src/api/network_status.rs index 29bddc6..54e77c9 100644 --- a/src/api/network_status.rs +++ b/src/api/network_status.rs @@ -1,7 +1,7 @@ // TODO: get genesis block identifier from env +use coinbase_mesh::models::{BlockIdentifier, NetworkStatusResponse, Peer}; use cynic::QueryBuilder; -use mesh::models::{BlockIdentifier, NetworkStatusResponse, Peer}; use crate::{ graphql::{Block3, DaemonStatus3, QueryNetworkStatus}, diff --git a/src/commands/serve.rs b/src/commands/serve.rs index c8a5285..687ace3 100644 --- a/src/commands/serve.rs +++ b/src/commands/serve.rs @@ -64,7 +64,7 @@ impl ServeCommand { macro_rules! create_handler { ($name:ident, $request_type:ty) => { paste! { - async fn [](mina_mesh: State>, Json(req): Json) -> impl IntoResponse { + async fn [](mina_mesh: State>, Json(req): Json) -> impl IntoResponse { Wrapper(mina_mesh.$name(req).await) } } diff --git a/src/config.rs b/src/config.rs index 0aac911..fc54e08 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,6 +1,6 @@ use anyhow::Result; use clap::{Args, Parser}; -use mesh::models::BlockIdentifier; +use coinbase_mesh::models::BlockIdentifier; use sqlx::PgPool; use crate::{graphql::GraphQLClient, util::default_mina_proxy_url, MinaMesh}; diff --git a/src/graphql/conversions.rs b/src/graphql/conversions.rs index 73b782b..6390b54 100644 --- a/src/graphql/conversions.rs +++ b/src/graphql/conversions.rs @@ -1,4 +1,6 @@ -use mesh::models::{AccountIdentifier, Amount, Currency, Operation, OperationIdentifier, SyncStatus as MeshSyncStatus}; +use coinbase_mesh::models::{ + AccountIdentifier, Amount, Currency, Operation, OperationIdentifier, SyncStatus as MeshSyncStatus, +}; use super::{PublicKey, SyncStatus, UserCommand}; diff --git a/src/lib.rs b/src/lib.rs index f1e9fc1..bf061a8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,12 +7,12 @@ mod playground; mod types; mod util; +pub use coinbase_mesh::models; +use coinbase_mesh::models::BlockIdentifier; pub use commands::*; pub use config::*; pub use error::*; use graphql::GraphQLClient; -pub use mesh::models; -use mesh::models::BlockIdentifier; use sqlx::PgPool; pub use types::*;