Releases: Beans-BV/dotnet-stellar-sdk
Releases · Beans-BV/dotnet-stellar-sdk
Release list
Release 16.0.0-beta
16.0.0-beta0
Pre-release. First beta of the 16.0 line — a large major release. It upgrades the XDR layer to Protocol 27 (CAP-71 Soroban auth), adds SEP-45 (web authentication for contract accounts), overhauls HTTP retry, and tightens
System.Text.Jsonand XDR binary decoding. Because of the breaking changes below, the next stable release is a major version bump. Please test against Testnet/Futurenet and report issues before stable16.0.0.
Breaking Changes
- Soroban credential API reshaped for CAP-71 (part of Protocol 27, #187):
SorobanCredentials.ToXdr()is nowabstract(was a concrete method that switched on the runtime type). Any external subclass ofSorobanCredentialsmust now overrideToXdr().- Removed
SorobanSourceAccountCredentials.ToSorobanCredentialsXdr()andSorobanAddressCredentials.ToSorobanCredentialsXdr(). CallToXdr()instead — it produces the same XDR via the newabstract/overridepair. SorobanCredentials,SorobanSourceAccountCredentials, andSorobanAddressCredentialsmoved fromInvokeHostFunctionOperation.csinto a newSorobanCredentials.cs. They stay in theStellarDotnetSdk.Operationsnamespace, sousing-based and fully-qualified references are unaffected.
- HTTP retry overhaul (#184):
ForSorobanPolling()is deprecated — it is now an[Obsolete]alias for the newForSoroban(). Rename your call sites.ForSoroban()and the newForHorizon()presets now retry transient HTTP status codes (408/429/500/502/503/504) on POST — including Stellar RPC JSON-RPC calls and HorizonSubmitTransaction()— not just connection failures as before. This is safe because Stellar submission is idempotent (each envelope is keyed by transaction hash + source-account sequence, so a resubmit returns the cached result or fails withtx_bad_seq). TheRetry-Afterheader is honored, capped byMaxRetryAfterDelay(default 1 minute).- New typed exceptions
TooManyRequestsException(HTTP 429) andServiceUnavailableException(HTTP 503) are now thrown for those responses — update any code that previously caught the generic HTTP exception for 429/503. - New
HttpResilienceOptionsknobs:RetryHttpStatusCodes,RetryHttpMethods(defaults to the safe methodsGET/HEAD/OPTIONS— addHttpMethod.Postto retry POST),RespectRetryAfter, andMaxRetryAfterDelay. - Do not wire the Soroban/Horizon presets into SEP service clients — SEP-10
POST /auth, SEP-24 interactive POSTs, and SEP-6 are non-idempotent. UseWithConnectionRetries()or a customHttpResilienceOptionslimited to safe methods there.
- Stricter XDR binary decoding (#189, addresses #165):
XdrDataInputStreamscalar reads now throwEndOfStreamException(wasIndexOutOfRangeException) on truncated input. Update anycatchclauses that relied on the old exception type. - Duplicate JSON properties are now rejected (#181, addresses #166):
JsonSerializerOptions.AllowDuplicatePropertiesis set tofalse, so a payload containing duplicate property names now throws aJsonExceptioninstead of silently keeping the last value. Well-formed Horizon/RPC responses are unaffected; this hardens parsing against ambiguous / parser-differential input. - Shared
JsonSerializerOptionsare now read-only (#183, addresses #168): the SDK's shared serializer options are frozen viaJsonSerializerOptions.MakeReadOnly(). If you mutated those shared options at runtime (e.g. adding a converter to the SDK's instance), that now throwsInvalidOperationException— clone the options before modifying.
Features
- Protocol 27 (CAP-71) Soroban authorization (#187, implements #186):
- XDR upgraded to the Protocol 27 schema (
stellar-xdr@68fa1ac). - New address-bound credential types:
SorobanAddressCredentialsV2—SOROBAN_CREDENTIALS_ADDRESS_V2(CAP-71-02). Same fields as the legacyADDRESS, but the signature is computed over the newENVELOPE_TYPE_SOROBAN_AUTHORIZATION_WITH_ADDRESSpreimage, binding the credential to the signer's address and preventing cross-account signature replay.SorobanAddressCredentialsWithDelegates,SorobanDelegateSignature, andSorobanDelegatedRoot—SOROBAN_CREDENTIALS_ADDRESS_WITH_DELEGATES(CAP-71-01) for delegated / multi-party signing via a (possibly nested) tree of delegate signatures.
- Signing helpers on
SorobanAuthorization:AuthorizeEntry,AuthorizeEntryWithDelegates,BuildWithDelegatesEntry,BuildAuthorizationEntryPreimageHash, plus the lower-levelBuildAuthPreimageHash/BuildAddressAuthPreimageHash. The preimage is selected from the credential type — legacyADDRESSkeeps the non-address-bound preimage;ADDRESS_V2and delegated entries sign the address-bound preimage. ISorobanEntrySignerabstraction with a built-inKeyPairEntrySigner(classic Ed25519), so custom-account (__check_auth) signers can be plugged in.SorobanCredentialsVersion(Preserve/V1/V2) controls the emitted credential type. It defaults toPreserve(keeps the entry's existing variant), so output stays valid on pre-Protocol-27 networks; opt in toV2explicitly. The default is expected to flip toV2once Protocol 28 makes it mandatory.- Delegated entries sort each delegate level by address and reject duplicates, as the protocol requires.
- Signing output is verified byte-for-byte against
@stellar/stellar-sdk@16.0.0-rc.1via known-answer vectors (StellarDotnetSdk.Tests/TestData/generate-p27-auth-kat.mjs). - Not included: the
simulateTransactionauthV2RPC flag from the original Protocol 27 plan is intentionally deferred — that RPC change is unconfirmed upstream (see #188).
- XDR upgraded to the Protocol 27 schema (
- SEP-45: Web Authentication for Contract Accounts (#190, implements #160):
ClientWebAuthContract— end-to-end client flow for authenticating a contract (C…) account:FromDomainAsync(discover the web-auth contract from a home domain) →GetChallengeAsync→ValidateChallenge→SignAuthorizationEntriesAsync→SendSignedChallengeAsync→JwtTokenAsync.Sep45Challenge— static helpers to parse, validate, verify, and build challenges, including theweb_auth_verifyinvocation hash that signers sign.- Hardened against hostile servers: the challenge decoder caps input size (
MaxChallengeXdrBytes, 64 KiB) and entry count to bound decode-time allocation. - Typed validation exceptions (
InvalidServerSignatureException,InvalidNonceException,InvalidWebAuthDomainException,InvalidClientDomainException, …) for precise failure handling.
Bug Fixes
- Handle
contract_credited/contract_debitedeffects in responses (#179, fixes #172) — these effect types previously had no response mapping. - Fix the documentation build (#178).
Documentation
- Add SEP compatibility matrices (#191).
Maintenance
- Enable
RespectNullableAnnotationsfor JSON deserialization (#182, addresses #167) — non-nullable reference-type properties are now enforced during deserialization, surfacing malformed payloads earlier. - Use
FrozenDictionaryfor static lookup tables in the JSON converters (#180, addresses #164) — faster, allocation-free lookups on the JSON hot path. Internal; no API change. - Add an integration test suite, phase 1 (#185) — new Testnet-backed
StellarDotnetSdk.IntegrationTestsproject. Development-only; not shipped in the NuGet package.
Full Changelog: 15.1.0...16.0.0-beta0
Release 15.1.0
Changes
Features
- feat: add SDK types for v26 frozen ledger keys and trustline-frozen results @cuongph87 (#177)
- feat: migrate XDR generator from xdrgen @cuongph87 (#169)
Maintenance
- chore: bump stellar-xdr to v26 @cuongph87 (#176)
- chore: regenerate XDR classes using the latest XDR generator @cuongph87 (#170)
Contributors
Release 15.1.0-beta
Changes
Features
- feat: add SDK types for v26 frozen ledger keys and trustline-frozen results @cuongph87 (#177)
- feat: migrate XDR generator from xdrgen @cuongph87 (#169)
Maintenance
- chore: bump stellar-xdr to v26 @cuongph87 (#176)
- chore: regenerate XDR classes using the latest XDR generator @cuongph87 (#170)
Contributors
Release 15.0.0
Changes
Breaking Changes
- feature!: improve
Operationresponse classes @cuongph87 (#119) - feature!: improve Effect response classes @cuongph87 (#117)
- fix!:
TransactionResponseclass @cuongph87 (#103) - fix!:
ClaimableBalanceResponseclass @cuongph87 (#102) - fix!:
TradeAggregationResponseclass @cuongph87 (#101) - fix!:
LedgerResponseclass @cuongph87 (#100) - Convert Json.NET to System.Text.Json @cuongph87 (#20)
Features
- feature: SEP-24 @jopmiddelkamp (#134)
- feature: SEP-6 @jopmiddelkamp (#133)
- feature: SEP-10 @jopmiddelkamp (#132)
- feature: SEP-9 @jopmiddelkamp (#131)
- feature: SEP-1 @jopmiddelkamp (#129)
- feature!: improve
Operationresponse classes @cuongph87 (#119) - feature!: improve Effect response classes @cuongph87 (#117)
- feature: issue #82 retry @jopmiddelkamp (#89)
- Convert Json.NET to System.Text.Json @cuongph87 (#20)
Bug Fixes
- fix: typos @cuongph87 (#149)
- fix: missing XML docs for
HealthRequestBuilder@cuongph87 (#147) - fix:
Pricetype inconsistencies @cuongph87 (#111) - fix:
TradeResponseclass @cuongph87 (#108) - fix:
RootResponseclass @cuongph87 (#107) - fix: type inconsistencies for muxed_id properties @cuongph87 (#113)
- fix: type inconsistencies for date time properties @cuongph87 (#115)
- fix:
LiquidityPoolResponseclass @cuongph87 (#106) - fix:
AccountResponseclass @cuongph87 (#104)
Documentation
- docs: added missing docs @jopmiddelkamp (#144)
Maintenance
- chore: version bump workflow action @cuongph87 (#154)
- chore: improve release labeler @cuongph87 (#152)
- chore: extend example app @cuongph87 (#150)
- refactor: unit tests @cuongph87 (#148)
- chore: improve release drafter @cuongph87 (#146)
- chore: add pull request autolabeler @cuongph87 (#145)
- chore: complete Horizon matrix parity @cuongph87 (#139)
- chore: rename Soroban RPC to Stellar RPC @cuongph87 (#143)
- chore: complete RPC matrix parity @cuongph87 (#140)
- chore: update urls @cuongph87 (#142)
- chore: update public API XML docs @cuongph87 (#141)
- chore: response results unit test coverage @jopmiddelkamp (#128)
- chore: request unit test coverage @jopmiddelkamp (#126)
- chore: operations unit test coverage @jopmiddelkamp (#125)
- chore: operations unit test coverage @jopmiddelkamp (#124)
- chore: unit test naming and docs @jopmiddelkamp (#122)
- chore: added unit test coverage for assets @jopmiddelkamp (#121)
- chore: add Soroban examples @cuongph87 (#120)
Contributors
Full Changelog: 14.0.1...15.0.0
Release 14.0.1
fix: use meta.V4.SorobanMeta?.ReturnValue instead of V3 in TransactionInfo
Release 14.0.0
This release adds support for Protocol 23.
Update:
- feat: add support for
Muxed_Ed25519public keys, liquidity pools and claimable balances toStrKey(#71) - feat: add support for
PreAuthTxandSHA256hashes toStrKey(#71) - feat: add new variants of
ScAddressincluding muxed accounts, liquidity pools and claimable balances (#72) - feat: add
IsValid*functions toStrKeyto help with checking the validity of the corresponding key types (#71) - feat: add
DestinationMuxedIdandDestinationMuxedIdTypetoInvokeHostFunctionOperationResponse.AssetContractBalanceChange(#65) - feat: update
SorobanServer#SimulateTransactionto add support for non-root authorization (#68) - feat: update
LedgerEntryChangeto support the newLEDGER_ENTRY_RESTOREDvariant (#75) - feat: add support for
TransactionMetaV4,OperationMetaV2,SorobanTransactionMetaV2,TransactionEvent(#77) - feat: add
OldestLedger,LatestLedgerCloseTimeandOldestLedgerCloseTimefields toGetEventsResponse(#69) - feat: add
TransactionIndexandOperationIndexfields toGetEventsResponse.EventInfo(#69) - refactor: add Events field to
TransactionInfo(#67) - feat: add new variants of
LedgerEntryConfigSetting: (#70)ConfigSettingContractLedgerCostExtV0ConfigSettingContractParallelComputeV0ConfigSettingScpTiming
- feat: add utility class
ClaimableBalanceIdUtilswith functions to handle claimable balance ID conversion between formats (#78) - feat: add support for retrieving related referencing a given liquidity pool in
OperationsRequestBuilder.
Breaking changes:
- chore: update XDR definitions for Protocol 23 (#63)
- refactor: rename
SorobanResources.ReadBytestoDiskReadBytes(#64) - refactor: remove the deprecated field
GetEventsResponse.EventInfo.PagingToken(#69) - refactor: mark
GetEventsResponse.EventInfo.InSuccessfulContractCallfield as deprecated. It will be removed in the next release (#69) - refactor: rename the following
SCAddressto follow standard naming conventions:SCAddresstoScAddressSCAccountIdtoScAccountIdSCContractIdtoScContractId
- chore: remove
ConfigSettingBucketListSizeWindow(#70) - refactor: mark the following functions in
StrKeyas deprecated, they will be removed in the next major release. Please refer to the documentation for each function to see the corresponding replacement functions: (#71)StrKey#EncodeStellarAccountId(byte[])StrKey#EncodeStellarSecretSeed(byte[])StrKey#EncodeStellarMuxedAccount(MuxedAccount)StrKey#DecodeStellarAccountId(string)StrKey#DecodeStellarSecretSeed(string)StrKey#DecodeStellarMuxedAccount(string)StrKey#IsValidMuxedAccount(string)
- refactor: mark
TransactionInfo.DiagnosticEventsXdrfield as deprecated. It will be removed in Stellar RPC soon. UseTransactionInfo.Events.DiagnosticEventsXdrinstead (#67) - refactor: move
ContractEvent.TopicsandContractEvent.Datafields toContractEvent.ContractEventV0field to align with the XDR version and improve future-proofing (#77) - refactor: change the type of
TransactionInfo.TransactionMetafromTransactionMetaV3toTransactionMetato align with the XDR version and improve future-proofing (#77) - refactor: update the following claimable balance related classes and fields for better ID handling:
- Type changes:
- Change
LedgerEntryClaimableBalance.BalanceIdfield frombyte[]tostring - Change
LedgerKeyClaimableBalance.BalanceIdfield frombyte[]tostring - Change
CreateClaimableBalanceSuccessconstructor to acceptstringinstead ofbyte[]
- Change
- Behavior changes:
CreateClaimableBalanceSuccess.BalanceIdnow returns a complete claimable balance ID- The following functions now correctly accept complete claimable balance IDs (0000...) instead of V0 IDs (without leading zeroes):
LedgerKeyClaimableBalance(string)constructorLedgerKey#ClaimableBalance(string)RevokeLedgerEntrySponsorshipOperation.ForClaimableBalance(string)
- Removals:
- Remove
ClaimClaimableBalanceOperation.BalanceIdInBytesfield - Remove
ClawbackClaimableBalanceOperation.BalanceIdInBytesfield - Remove
LedgerKey#ClaimableBalance(byte[])method - Remove
LedgerKeyClaimableBalance(byte[])constructor
- Remove
- Type changes:
Full Changelog: 13.2.1...14.0.0
14.0.0-beta
Update:
- feat: add support for
Muxed_Ed25519public keys, liquidity pools and claimable balances toStrKey(#71) - feat: add support for
PreAuthTxandSHA256hashes toStrKey(#71) - feat: add new variants of
ScAddressincluding muxed accounts, liquidity pools and claimable balances (#72) - feat: add
IsValid*functions toStrKeyto help with checking the validity of the corresponding key types (#71) - feat: add
DestinationMuxedIdandDestinationMuxedIdTypetoInvokeHostFunctionOperationResponse.AssetContractBalanceChange(#65) - feat: update
SorobanServer#SimulateTransactionto add support for non-root authorization (#68) - feat: update
LedgerEntryChangeto support the newLEDGER_ENTRY_RESTOREDvariant (#75) - feat: add support for
TransactionMetaV4,OperationMetaV2,SorobanTransactionMetaV2,TransactionEvent(#77) - feat: add
OldestLedger,LatestLedgerCloseTimeandOldestLedgerCloseTimefields toGetEventsResponse(#69) - feat: add
TransactionIndexandOperationIndexfields toGetEventsResponse.EventInfo(#69) - refactor: add Events field to
TransactionInfo(#67) - feat: add new variants of
LedgerEntryConfigSetting: (#70)ConfigSettingContractLedgerCostExtV0ConfigSettingContractParallelComputeV0ConfigSettingScpTiming
- feat: add utility class
ClaimableBalanceIdUtilswith functions to handle claimable balance ID conversion between formats (#78) - feat: add support for retrieving related referencing a given liquidity pool in
OperationsRequestBuilder.
Breaking changes:
- chore: update XDR definitions for Protocol 23 (#63)
- refactor: rename
SorobanResources.ReadBytestoDiskReadBytes(#64) - refactor: remove the deprecated field
GetEventsResponse.EventInfo.PagingToken(#69) - refactor: mark
GetEventsResponse.EventInfo.InSuccessfulContractCallfield as deprecated. It will be removed in the next release (#69) - refactor: rename the following
SCAddressto follow standard naming conventions:SCAddresstoScAddressSCAccountIdtoScAccountIdSCContractIdtoScContractId
- chore: remove
ConfigSettingBucketListSizeWindow(#70) - refactor: mark the following functions in
StrKeyas deprecated, they will be removed in the next major release. Please refer to the documentation for each function to see the corresponding replacement functions: (#71)StrKey#EncodeStellarAccountId(byte[])StrKey#EncodeStellarSecretSeed(byte[])StrKey#EncodeStellarMuxedAccount(MuxedAccount)StrKey#DecodeStellarAccountId(string)StrKey#DecodeStellarSecretSeed(string)StrKey#DecodeStellarMuxedAccount(string)StrKey#IsValidMuxedAccount(string)
- refactor: mark
TransactionInfo.DiagnosticEventsXdrfield as deprecated. It will be removed in Stellar RPC soon. UseTransactionInfo.Events.DiagnosticEventsXdrinstead (#67) - refactor: move
ContractEvent.TopicsandContractEvent.Datafields toContractEvent.ContractEventV0field to align with the XDR version and improve future-proofing (#77) - refactor: change the type of
TransactionInfo.TransactionMetafromTransactionMetaV3toTransactionMetato align with the XDR version and improve future-proofing (#77) - refactor: update the following claimable balance related classes and fields for better ID handling:
- Type changes:
- Change
LedgerEntryClaimableBalance.BalanceIdfield frombyte[]tostring - Change
LedgerKeyClaimableBalance.BalanceIdfield frombyte[]tostring - Change
CreateClaimableBalanceSuccessconstructor to acceptstringinstead ofbyte[]
- Change
- Behavior changes:
CreateClaimableBalanceSuccess.BalanceIdnow returns a complete claimable balance ID- The following functions now correctly accept complete claimable balance IDs (0000...) instead of V0 IDs (without leading zeroes):
LedgerKeyClaimableBalance(string)constructorLedgerKey#ClaimableBalance(string)RevokeLedgerEntrySponsorshipOperation.ForClaimableBalance(string)
- Removals:
- Remove
ClaimClaimableBalanceOperation.BalanceIdInBytesfield - Remove
ClawbackClaimableBalanceOperation.BalanceIdInBytesfield - Remove
LedgerKey#ClaimableBalance(byte[])method - Remove
LedgerKeyClaimableBalance(byte[])constructor
- Remove
- Type changes:
Full Changelog: 13.2.0...14.0.0
Release 13.2.1
What's Changed
- fix: SubmitTransactionAsync throwing exception for valid HTTP 201 responses #61 by @cuongph87 in #76
Full Changelog: 13.2.0...13.2.1
Release 13.2.0
Changes
- Improve WebAuthentication: @cuongph87 (#60)
- Better naming and extracted helper methods for clearer logic flow and better readability
- Removed unnecessary operations and improved variable usage for improved performance
- Replaced obsoleted
RandomGeneratorwith the recommendedRandomNumberGenerator - Time-bounds verification now uses UTC by default
ReadChallengeTransaction,VerifyChallengeTransactionSignersand related helpers will evaluate the TimeBounds window againstDateTimeOffset.UtcNowwhen thenowargument is not supplied.
This eliminates false positives/negatives on hosts with a mis-configured time-zone or during DST transitions.
If your application intentionally needs to evaluate the window against local wall-clock time, passDateTimeOffset.Nowexplicitly.
- Correct paths to example classes @cuongph87 (#58)
Release 13.1.4
Changes
- Update .NET SDK version in global.json @cuongph87 (#57)