-
Notifications
You must be signed in to change notification settings - Fork 5
fix: RootResponse class
#107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,46 +1,108 @@ | ||
| { | ||
| { | ||
| "_links": { | ||
| "account": { | ||
| "href": "https://horizon.stellar.org/accounts/{account_id}", | ||
| "href": "https://horizon-testnet.stellar.org/accounts/{account_id}", | ||
| "templated": true | ||
| }, | ||
| "accounts": { | ||
| "href": "https://horizon-testnet.stellar.org/accounts{?signer,sponsor,asset,liquidity_pool,cursor,limit,order}", | ||
| "templated": true | ||
| }, | ||
| "account_transactions": { | ||
| "href": "https://horizon.stellar.org/accounts/{account_id}/transactions{?cursor,limit,order}", | ||
| "href": "https://horizon-testnet.stellar.org/accounts/{account_id}/transactions{?cursor,limit,order}", | ||
| "templated": true | ||
| }, | ||
| "claimable_balances": { | ||
| "href": "https://horizon-testnet.stellar.org/claimable_balances{?asset,sponsor,claimant,cursor,limit,order}", | ||
| "templated": true | ||
| }, | ||
| "assets": { | ||
| "href": "https://horizon.stellar.org/assets{?asset_code,asset_issuer,cursor,limit,order}", | ||
| "href": "https://horizon-testnet.stellar.org/assets{?asset_code,asset_issuer,cursor,limit,order}", | ||
| "templated": true | ||
| }, | ||
| "effects": { | ||
| "href": "https://horizon-testnet.stellar.org/effects{?cursor,limit,order}", | ||
| "templated": true | ||
| }, | ||
| "fee_stats": { | ||
| "href": "https://horizon-testnet.stellar.org/fee_stats" | ||
| }, | ||
| "friendbot": { | ||
| "href": "https://horizon.stellar.org/friendbot{?addr}", | ||
| "href": "https://friendbot.stellar.org/{?addr}", | ||
| "templated": true | ||
| }, | ||
| "ledger": { | ||
| "href": "https://horizon-testnet.stellar.org/ledgers/{sequence}", | ||
| "templated": true | ||
| }, | ||
| "ledgers": { | ||
| "href": "https://horizon-testnet.stellar.org/ledgers{?cursor,limit,order}", | ||
| "templated": true | ||
| }, | ||
| "liquidity_pools": { | ||
| "href": "https://horizon-testnet.stellar.org/liquidity_pools{?reserves,account,cursor,limit,order}", | ||
| "templated": true | ||
| }, | ||
| "offer": { | ||
| "href": "https://horizon-testnet.stellar.org/offers/{offer_id}", | ||
| "templated": true | ||
| }, | ||
| "metrics": { | ||
| "href": "https://horizon.stellar.org/metrics" | ||
| "offers": { | ||
| "href": "https://horizon-testnet.stellar.org/offers{?selling,buying,seller,sponsor,cursor,limit,order}", | ||
| "templated": true | ||
| }, | ||
| "operation": { | ||
| "href": "https://horizon-testnet.stellar.org/operations/{id}", | ||
| "templated": true | ||
| }, | ||
| "operations": { | ||
| "href": "https://horizon-testnet.stellar.org/operations{?cursor,limit,order,include_failed}", | ||
| "templated": true | ||
| }, | ||
| "order_book": { | ||
| "href": "https://horizon.stellar.org/order_book{?selling_asset_type,selling_asset_code,selling_issuer,buying_asset_type,buying_asset_code,buying_issuer,limit}", | ||
| "href": "https://horizon-testnet.stellar.org/order_book{?selling_asset_type,selling_asset_code,selling_asset_issuer,buying_asset_type,buying_asset_code,buying_asset_issuer,limit}", | ||
| "templated": true | ||
| }, | ||
| "payments": { | ||
| "href": "https://horizon-testnet.stellar.org/payments{?cursor,limit,order,include_failed}", | ||
| "templated": true | ||
| }, | ||
| "self": { | ||
| "href": "https://horizon.stellar.org/" | ||
| "href": "https://horizon-testnet.stellar.org/" | ||
| }, | ||
| "strict_receive_paths": { | ||
| "href": "https://horizon-testnet.stellar.org/paths/strict-receive{?source_assets,source_account,destination_account,destination_asset_type,destination_asset_issuer,destination_asset_code,destination_amount}", | ||
| "templated": true | ||
| }, | ||
| "strict_send_paths": { | ||
| "href": "https://horizon-testnet.stellar.org/paths/strict-send{?destination_account,destination_assets,source_asset_type,source_asset_issuer,source_asset_code,source_amount}", | ||
| "templated": true | ||
| }, | ||
| "trade_aggregations": { | ||
| "href": "https://horizon-testnet.stellar.org/trade_aggregations?base_asset_type={base_asset_type}&base_asset_code={base_asset_code}&base_asset_issuer={base_asset_issuer}&counter_asset_type={counter_asset_type}&counter_asset_code={counter_asset_code}&counter_asset_issuer={counter_asset_issuer}", | ||
| "templated": true | ||
| }, | ||
| "trades": { | ||
| "href": "https://horizon-testnet.stellar.org/trades?base_asset_type={base_asset_type}&base_asset_code={base_asset_code}&base_asset_issuer={base_asset_issuer}&counter_asset_type={counter_asset_type}&counter_asset_code={counter_asset_code}&counter_asset_issuer={counter_asset_issuer}", | ||
| "templated": true | ||
| }, | ||
| "transaction": { | ||
| "href": "https://horizon.stellar.org/transactions/{hash}", | ||
| "href": "https://horizon-testnet.stellar.org/transactions/{hash}", | ||
| "templated": true | ||
| }, | ||
| "transactions": { | ||
| "href": "https://horizon.stellar.org/transactions{?cursor,limit,order}", | ||
| "href": "https://horizon-testnet.stellar.org/transactions{?cursor,limit,order}", | ||
| "templated": true | ||
| } | ||
| }, | ||
| "horizon_version": "snapshot-c5fe0ff", | ||
| "core_version": "stellar-core 9.2.0 (7561c1d53366ec79b908de533726269e08474f77)", | ||
| "horizon_version": "24.0.0-479385ffcbf959dad6463bb17917766f5cb4d43f", | ||
| "core_version": "stellar-core 24.1.0 (5a7035d49201b88db95e024b343fb866c2185043)", | ||
| "history_latest_ledger": 18369116, | ||
| "history_elder_ledger": 1, | ||
| "history_latest_ledger_closed_at": "2025-12-01T04:30:48Z", | ||
| "history_elder_ledger": 53789041, | ||
| "core_latest_ledger": 18369117, | ||
| "network_passphrase": "Public Global Stellar Network ; September 2015", | ||
| "current_protocol_version": 10, | ||
| "core_supported_protocol_version": 11 | ||
| "current_protocol_version": 24, | ||
| "core_supported_protocol_version": 24, | ||
| "supported_protocol_version": 24 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,79 @@ | ||
| using System.Text.Json.Serialization; | ||
| using System; | ||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace StellarDotnetSdk.Responses; | ||
| #nullable disable | ||
|
|
||
| public class RootResponse : Response | ||
| /// <summary> | ||
| /// Represents the root endpoint response from a Horizon server. | ||
| /// Contains version and network information about the Horizon instance. | ||
| /// </summary> | ||
| public sealed class RootResponse : Response | ||
| { | ||
| /// <summary> | ||
| /// Links to related resources and endpoints. | ||
| /// </summary> | ||
| [JsonPropertyName("_links")] | ||
| public required RootResponseLinks Links { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// The version of the Horizon server software. | ||
| /// </summary> | ||
| [JsonPropertyName("horizon_version")] | ||
| public string HorizonVersion { get; init; } | ||
| public required string HorizonVersion { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// The version of Stellar Core connected to this Horizon instance. | ||
| /// </summary> | ||
| [JsonPropertyName("core_version")] | ||
| public string StellarCoreVersion { get; init; } | ||
| public required string StellarCoreVersion { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// The sequence number of the latest ledger stored in Horizon's history database. | ||
| /// </summary> | ||
| [JsonPropertyName("history_latest_ledger")] | ||
| public int HistoryLatestLedger { get; init; } | ||
| public required long HistoryLatestLedger { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// The time the latest ledger was closed. | ||
| /// </summary> | ||
| [JsonPropertyName("history_latest_ledger_closed_at")] | ||
| public required DateTimeOffset HistoryLatestLedgerClosedAt { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// The sequence number of the oldest ledger stored in Horizon's history database. | ||
| /// </summary> | ||
| [JsonPropertyName("history_elder_ledger")] | ||
| public int HistoryElderLedger { get; init; } | ||
| public required long HistoryElderLedger { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// The sequence number of the latest ledger known to Stellar Core. | ||
| /// </summary> | ||
| [JsonPropertyName("core_latest_ledger")] | ||
| public int CoreLatestLedger { get; init; } | ||
| public required long CoreLatestLedger { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// The network passphrase that identifies which Stellar network this Horizon is connected to. | ||
| /// Common values are "Public Global Stellar Network ; September 2015" for mainnet | ||
| /// and "Test SDF Network ; September 2015" for testnet. | ||
| /// </summary> | ||
| [JsonPropertyName("network_passphrase")] | ||
| public string NetworkPassphrase { get; init; } | ||
| public required string NetworkPassphrase { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// The current protocol version in use on the network. | ||
| /// </summary> | ||
| [JsonPropertyName("current_protocol_version")] | ||
| public int CurrentProtocolVersion { get; init; } | ||
| public required int CurrentProtocolVersion { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// The maximum protocol version supported by the connected Stellar Core. | ||
| /// </summary> | ||
| [JsonPropertyName("core_supported_protocol_version")] | ||
| public int CoreSupportedProtocolVersion { get; init; } | ||
| public required int CoreSupportedProtocolVersion { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// The maximum protocol version supported by the connected Stellar. | ||
| /// </summary> | ||
| [JsonPropertyName("supported_protocol_version")] | ||
| public required int SupportedProtocolVersion { get; init; } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.