v0.3.0
See also the v0.2.0 to v0.3.0 upgrade guide.
BREAKING CHANGES
binary-codec
EncodeForSigningBatchnow creates theBatchV1_1signing payload from xrpld 3.3.0 and requires the outeraccountand effectivesequence. The optionalbatchAccountbinds the Batch signer.signerAccountbinds a nested multisigner account and is valid only whenbatchAccountis also present. The obsoleteBatchsigning payload is no longer supported. AddedErrBatchAccountFieldNotFound,ErrBatchSequenceFieldNotFound, andErrBatchSignerAccountWithoutBatchAccountfor these requirements.EncodeQualitynow normalizes nonzero values to a 16-digit mantissa and accepts only normalized exponents from -96 through 80. This rejects some extreme values that v0.2.0 accepted, such as1e-85.- Removed the unused
ErrBatchTxIDNotStringsentinel. Invalid transaction ID collection types continue to returnErrBatchTxIDsNotArray. - Renamed the
UInt384andUInt512protocol type definitions toHash384andHash512, and removed thetecHOOK_REJECTEDandtecNO_DELEGATE_PERMISSIONtransaction result mappings. - Removed
types.MaxDrops. Usecurrency.MaxNativeDropsfor the maximum native XRP amount in drops.
dependencies
- Raised the minimum Go version from 1.24.3 to 1.25.12 to include upstream standard-library security fixes.
keypairs
DeriveClassicAddressnow accepts only Ed25519 and compressed secp256k1 public keys. Uncompressed secp256k1 and other unsupported public-key encodings returnErrInvalidPublicKeyFormat.
pkg/crypto
SECP256K1CryptoAlgorithm.Signnow returnsErrInvalidPrivateKeydirectly for malformed hexadecimal private keys instead of wrapping the hexadecimal decode error. Ed25519 signing continues to preserve its wrapped decode error.
xrpl/hash
SignTxandSignTxBlobnow reject partial, empty, malformed, or mixed single-sign/multisign structures. Multisigned transactions require an explicit empty top-levelSigningPubKey. Inner Batch transactions remain hashable only in their canonical unsigned shape with an explicit emptySigningPubKeyand noTxnSignatureorSigners. Consensus-generatedEnableAmendment,SetFee, andUNLModifypseudo-transactions remain hashable without account signatures. DeprecatedErrMissingSignatureis now an alias ofErrNonSignedTransaction, soerrors.Ismatches either name.
xrpl/common
- Changed
DefaultFeeCushionfromfloat32tofloat64andDefaultMaxFeeXRPfromfloat32to a decimal string.
xrpl/currency
- Replaced the deprecated
float64constantDropsPerXrpwith the exact untyped constantDropsPerXRP. This is a source-breaking rename, useDropsPerXRPor the native amount conversion helpers.
xrpl/ledger-entry-types
- Changed MPT ledger amount fields from
uint64to quoted base-10 strings. ChangedMPToken.OwnerNodeandMPTokenIssuance.OwnerNodefromuint64to hexadecimal strings.MPTokenIssuanceJSON now omits absentAssetScale,TransferFee, andMPTokenMetadatafields. - Changed
Oracle.OwnerNodeandEscrow.IssuerNodefromuint64to hexadecimal strings. ChangedPriceData.AssetPricefromuint64to*uint64, useledger.AssetPriceto set a value.PriceDatanow decodesrippledhexadecimal price strings, preserves absent and explicit zero prices, and accepts the XLS-47Scalerange through 20.PriceData.FlattenomitsScalewhenAssetPriceis absent, whilePriceData.Validaterejects a nonzeroScalewithout a price. Added the missingOracle.LedgerEntryTypeandOracle.Flagsfields. - Replaced the v0.2.0
MPTokenIssuance.MutableFlagsmodel andLsmfMPT*constants with the rippled 3.3.0ImmutableFlagsmodel andLsifMPT*constants. Set bits now identify capabilities and fields that can no longer change.
xrpl/queries
EntryRequest.Validatenow requires exactly one top-level selector instead of accepting requests with no selector or multiple selectors.EntryRequest.Indexnow omits an empty value from JSON.
xrpl/queries/server
- Changed
types.Info.NetworkIDfromuintto*uint32, so callers must check fornilbefore dereferencing the server-reported network ID. Current self-hosted rippled nodes can omitserver_info.network_id: rippled sends it only when a network ID is configured, and the example configuration stanza is disabled by default. This is not only an old-server case. Clients can userpc.WithNetworkIdentityorwebsocket.ClientConfig.WithNetworkIdentitywith trusted deployment values. - Changed
ClosedLedger.BaseFeeXRPfromfloat32to*float64so fee calculation starts with binary64 precision and callers can distinguish a missing or null value from an explicit zero. - Changed the normalized
types.Infoload factor fields fromuinttofloat64so fractionalserver_infovalues are accepted. A missingload_factornow uses the protocol default of1instead of0. - Renamed
types.Info.LoadFactorFeeEscelationtoLoadFactorFeeEscalationand corrected its JSON tag toload_factor_fee_escalation. - Changed
types.ClosedLedgerState.BaseFeeandReserveBasefromfloat32touint64, andReserveIncfromfloat32to*uint64, becauseserver_statereports these values as integer drops. The pointer distinguishes a missing or null owner reserve from an explicit zero. - Changed
types.LedgerState.BaseFeeandReserveBasefromuinttouint64, andReserveIncfromuintto*uint64, so drop values are architecture-independent and callers can distinguish a missing or null owner reserve from an explicit zero.
xrpl/queries/clio
- Changed
LedgerInfo.BaseFeeXRPandLedgerInfo.ReserveIncXRPfromfloat32values to*float64pointers so Clio responses preserve missing or null fee data separately from explicit zero.
xrpl/rpc
- Changed
WithFeeCushionfromfloat32tofloat64andWithMaxFeeXRPfromfloat32to a decimal string so fee configuration preserves binary64 inputs and exact decimal caps. - Replaced the public client
NetworkIDfield with the mutex-guardedNetworkIdentity()snapshot accessor, which returns(*uint32, string)for the network ID and build version. A nil network ID means discovery has not completed. An omittedserver_info.network_idresolves to rippled's default network ID0. UseWithNetworkIdentity(networkID, buildVersion)with a non-empty build version to bypass discovery with trusted deployment values. An empty build version leaves the identity incomplete, so the client performs discovery. - Replaced the exported
ErrMismatchedTagstruct type with an error sentinel of the same name. Replace struct literals anderrors.Aschecks witherrors.Is(err, rpc.ErrMismatchedTag). - Submit preflight now requires a complete single-sign or multisign structure, including an explicit empty top-level
SigningPubKeyfor multisigned transactions. Partial signing fields now returnErrInvalidSignedTransaction.SubmitMultisignedreturnsErrTransactionNotMultisignedfor another signing form,ErrSignerDataIsEmptyremains as a deprecated compatibility alias. DeliverMaxnormalization is Payment-only. Other transaction types do not rewrite this field.- Removed
ErrTransactionNotFound. Reliable submission now treats exacttxnNotFoundresponses as a pending state until validation, expiry, finality transport failure, or context cancellation.
xrpl/testutil
- Added
NetworkIdentity,GetServerDefinitions, andSimulateto the integrationClientinterface. External implementations and generated mocks of this test interface must implement these methods. NewRunnernow replaces zeroWalletCountandMaxRetriesvalues with their defaults and modifies those fields in the suppliedRunnerConfig.WithWallets(0)andWithMaxRetries(0)no longer preserve explicit zero values.
xrpl/transaction
- Replaced the v0.2.0 Dynamic MPT
MutableFlagsfields with rippled 3.3.0ImmutableFlagsfields onMPTokenIssuanceCreateandMPTokenIssuanceSet. Usetypes.ImmutableFlagsand theTifMPT*constants and setters to make issuance capabilities or fields permanently immutable. - Moved
MPTokenIssuanceSetcapability enablement into transactionFlags. UseTfMPTSetCanLock(0x04),TfMPTSetRequireAuth(0x08),TfMPTSetCanEscrow(0x10),TfMPTSetCanTrade(0x20),TfMPTSetCanTransfer(0x40),TfMPTSetCanClawback(0x80), andTfMPTSetCanHoldConfidentialBalance(0x100).Validateaccepts universal transaction flags and rejects unsupported bits. - Removed the v0.2.0
MutableFlagsconstants, set and clear methods, helper, and validation errors. The rippled 3.3.0 model permits capability flags with metadata, transfer-fee, and immutability changes, but not with lock or unlock operations. AHolder-only transaction is rejected as empty, it must include a lock or unlock flag. - Added
types.MPTAmountfor quoted base-10 MPT values and changedMPTokenIssuanceCreate.MaximumAmountfrom*types.XRPCurrencyAmountto*types.MPTAmount. When present,MaximumAmountmust be in the range1..2^63-1.types.MaxMPTAmountexposes the upper bound, andtypes.ErrInvalidMPTAmountreports invalid quoted values.
xrpl/wallet
types.BatchSignablenow includes the outerAccount, effectiveSequence, optionalBatchAccount, and optionalSignerAccountrequired byBatchV1_1.FromBatchTransactionandFromFlatBatchTransactionrequire a non-empty outer account and exactly one nonzeroSequenceorTicketSequence. AddedErrAccountFieldIsNotAString,ErrSequenceFieldIsNotAnUint32,ErrTicketSequenceFieldIsNotAnUint32,ErrBatchSequenceAndTicket, andErrBatchSequenceNotSetfor invalid constructor input.Equalsnow also compares the outer account and effective sequence. Old unkeyed literals no longer compile. Old keyed literals that omitAccountorSequencecompile but cannot create a valid signing payload. Existing Batch signature fragments must be recreated.
xrpl/websocket
- Changed
ClientConfig.WithFeeCushionandDefaultFeeCushionfromfloat32tofloat64, changedClientConfig.WithMaxFeeXRPandDefaultMaxFeeXRPfromfloat32to decimal strings. Fee configuration now preserves binary64 inputs and exact decimal caps. - Replaced the public client
NetworkIDfield with the mutex-guardedNetworkIdentity()snapshot accessor, which returns(*uint32, string)for the network ID and build version. A nil network ID means discovery has not completed. An omittedserver_info.network_idresolves to rippled's default network ID0. UseClientConfig.WithNetworkIdentity(networkID, buildVersion)with a non-empty build version to bypass discovery with trusted deployment values. An empty build version leaves the identity incomplete, so the client performs discovery. - Changed
Client.Connectto requestserver_infobefore it starts the background reader. A request, response, or identity failure now failsConnectand closes the new connection. An omittednetwork_idresolves to rippled's default network ID0. Client.Connectno longer replaces an active or in-progress connection and now returnsErrAlreadyConnected.- Added the exported
Errfield toErrMaxReconnectionAttemptsReached. Unkeyed literals such asErrMaxReconnectionAttemptsReached{3}no longer compile. Use keyed literals such asErrMaxReconnectionAttemptsReached{Attempts: 3}. - Submit preflight now requires a complete single-sign or multisign structure, including an explicit empty top-level
SigningPubKeyfor multisigned transactions. Partial signing fields now returnErrInvalidSignedTransaction.SubmitMultisignedreturnsErrTransactionNotMultisignedfor another signing form,ErrSignerDataIsEmptyremains as a deprecated compatibility alias. DeliverMaxnormalization is Payment-only. Other transaction types do not rewrite this field.- Removed
ErrTransactionNotFound. Reliable submission now treats exacttxnNotFoundresponses as a pending state until validation, expiry, finality transport failure, or context cancellation.
Added
binary-codec
- Added serialization definitions for
ReferenceHolding,TakerPaysMPT, andTakerGetsMPT. - Added
types.RawFieldValueOverridesandSTObject.FromJSONWithRawFieldValueOverridesfor controlled raw field-value serialization.
documentation
- Added a v0.2.0-to-v0.3.0 upgrade guide and versioned v0.3.x changelog pages, and expanded package documentation for currency, hashing, ledger entries, queries, transactions, RPC, and WebSocket usage.
development
- Added an xrpld localnet integration runner and CI workflow, with configurable image, configuration, and container settings.
keypairs
- Added
ErrInvalidPrivateKeyFormatandErrInvalidPublicKeyFormat, which wrapErrInvalidCryptoImplementationfor backward-compatibleerrors.Ischecks without exposing key material.
pkg/typecheck
- Added
ToStringto convert plain and named string values through one shared helper.
xrpl/currency
- Exported the typed
MaxNativeDropsconstant for the maximum native XRP amount in drops. - Added the exact, immutable
Dropsarithmetic type for non-negative drop quantities, with drops and XRP constructors, fraction-preserving arithmetic, comparison, rounding, and formatting methods. Constructors accept valid non-canonical decimal inputs up to 1024 bytes but do not enforceMaxNativeDrops; callers must validate the protocol limit before encoding or submission. AddedErrInvalidNativeAmount,ErrNegativeNativeAmount,ErrInvalidDecimalMultiplier,ErrFractionalDrops, andErrDropsDivisionByZerofor validation failures.
xrpl/flag
- Added
ContainsOnlyto check that a flag value contains no bits outside an allowed mask.
xrpl/ledger-entry-types
- Added
MPTokenIssuance.ReferenceHolding,DirectoryNode.TakerPaysMPT, andDirectoryNode.TakerGetsMPT, plus theLsfMPTAMMflag andSetLsfMPTAMMsetter for AMM-owned MPT holdings. - Added
LsfMPTCanHoldConfidentialBalanceandSetLsfMPTCanHoldConfidentialBalancefor the rippled 3.3.0 MPT confidential-balance capability.
xrpl/queries
- Added query field coverage for account lines (
ignore_defaultrequest andlimitresponse), AMM info (account, frozen flags, auctiontime_interval), NFT offer pagination (limit/marker), vault current-ledger metadata, and v1 account NFT ledger metadata, with default and v1 JSON serialization fixtures including the AMM expired-slot interval sentinel. - Expanded typed
ledger_entryselector support with Clio deleted-entry metadata and distinct JSON (node) and binary (node_binary) responses across RPC and WebSocket transports. Responses must contain exactly one non-empty payload. - Added typed
server_definitionssupport for validated full, legacy, and hash-only protocol definitions. Validation rejects null or incomplete core sections, accepts the five enhanced sections independently, and requires hash-only responses to match the request hash. Response values can be marshaled before they are complete, while decoding and explicit validation enforce wire requirements. RPC and WebSocket integration tests cover full and hash-only response forms. - Added XLS-69
simulatedry runs to the RPC and WebSocket clients, with JSON and binary responses and validated JSON or opaque hexadecimal blob requests. JSON requests support server-autofilled NetworkID values and validate supplied NetworkID values against the client target network, with RPC identity discovery when needed. They permit non-emptySigningPubKeyvalues and unsignedSignersorBatchSignersentries. They reject non-emptyTxnSignaturevalues in the transaction or supported signer entries. Blob requests check hexadecimal syntax and delegate transaction, signature, and NetworkID validation to the server. Response values can be marshaled before they are complete, while decoding and request-mode validation remain strict. Integration tests cover JSON and binary simulations. - Added
ErrInvalidEntryRequest,ErrInvalidEntrySelector,ErrInvalidBridgeSelector, andErrInvalidEntryResponsefor typedledger_entryvalidation failures.
xrpl/queries/amm
- Added
ledger_hashandledger_indexfields toInfoRequest, andledger_current_indextoInfoResponsefor open-ledger responses.
xrpl/queries/subscription/types
- Added
BookChangesStreamTypefor thebookChangessubscription notification discriminator.
xrpl/transaction
- Added centralized transaction type constants and
IsPseudoTransactionTypeclassification forEnableAmendment,SetFee, andUNLModify. - Added
ErrBatchRawTransactionsCountfor the XLS-56 limit of 2 through 8 Batch inner transactions. RPC and WebSocket expose the shared signed-Batch preflight sentinel with the same name. - Added
ErrMPTIssuanceCreateInvalidImmutableFlagsandErrMPTIssuanceSetInvalidImmutableFlagsfor unsupported Dynamic MPT immutability bits,ErrMPTIssuanceSetInvalidFlagsfor unsupportedMPTokenIssuanceSetFlagsbits, and transfer-fee conflict errors for confidential MPT balances. - Added
TfMPTCanHoldConfidentialBalanceand its create setter, plus immutability support for confidential balances, metadata, and transfer fees. - Added MPT amount and
Holdersupport toClawback, including JSON, binary encoding, signing, and validation. Validation rejects invalid issuer and holder combinations, invalid or zero amounts, and XRP amounts.
xrpl/queries/server
- Added
types.Info.RippledVersionfor Clioserver_inforesponses andtypes.Info.ServerVersionto preferbuild_versionwithrippled_versionas the fallback. - Added
ErrInvalidDefinitionsHash,ErrInvalidDefinitionsResponse, andErrInvalidDefinitionFieldforserver_definitionsvalidation failures.
xrpl/queries/transactions
- Added
ErrInvalidSimulateRequest,ErrInvalidSimulateTxJSON,ErrInvalidSimulateTxBlob,ErrSignedSimulateTransaction,ErrInvalidSimulateNetworkID,ErrMismatchedSimulateNetworkID, andErrInvalidSimulateResponseforsimulatevalidation failures.
xrpl/rpc
- Added
WithNetworkIdentityfor trusted network identity configuration. - Added
ErrAddressFieldIsNotAString,ErrTagFieldIsNotAUint32,ErrInvalidAddress, andErrAccountIDTagNotAllowedfor address autofill errors, andErrNetworkIDFieldUnexpected,ErrInvalidBuildVersion,ErrNetworkIDOverrideMismatch,ErrNetworkIDUnavailable, andErrBuildVersionUnavailablefor network identity errors. - Added
ErrNilTransactionfor nil autofill or submission inputs andErrLastLedgerSequenceFieldMustBeAbsentfor invalid Batch inner transactions. - Added X-address autofill for Account, Destination, Authorize, Unauthorize, Owner, RegularKey, Delegate, NFTokenMinter, Subject, Issuer, and Holder fields in outer and Batch inner transactions. Embedded Account and Destination tags, including tag
0, populate the matching tag field. Conflicting explicit tags returnErrMismatchedTag, and tagged X-addresses in fields without a tag counterpart returnErrAccountIDTagNotAllowed. - Added
SubmitTxAndWaitContextandSubmitTxBlobAndWaitContextwith caller cancellation across transaction preparation, submission, and finality monitoring, plus reliable-submission error sentinels for malformed preliminary results, ledger expiry, repeated monitoring transport failure, and invalid polling intervals. - Added
ErrInvalidMaxRetriesandErrInvalidLastLedgerSequencefor non-positive retry limits and zero ledger boundaries. - Added
ErrInvalidFeeValueandErrFeeHasTooManyDecimalsfor fee validation. - Added
ErrResponseErrorFieldIsNotAStringfor malformed RPC error responses. - Added
ErrInsecureAuthorizationandErrAuthorizationRequestFailedfor secure, redaction-safe authorized transport failures.
xrpl/transaction/integration
- Added RPC and WebSocket live-ledger coverage for X-address autofill and discovered NetworkID policy.
xrpl/transaction/types
- Added shared
TfFullyCanonicalSigandTfUniversaltransaction flag definitions, and moved the existingTfInnerBatchTxndefinition alongside them. - Added
MaxMPTAmountandErrInvalidMPTAmountfor the quoted base-10 MPT amount range.
xrpl/websocket
- Added
ClientConfig.WithNetworkIdentityfor trusted network identity configuration andNetworkIdentityfor concurrency-safe identity access. - Added
ErrAddressFieldIsNotAString,ErrTagFieldIsNotAUint32,ErrInvalidAddress,ErrMismatchedTag, andErrAccountIDTagNotAllowedfor address autofill errors, andErrNetworkIDFieldUnexpected,ErrInvalidBuildVersion,ErrNetworkIDOverrideMismatch,ErrNetworkIDUnavailable, andErrBuildVersionUnavailablefor network identity errors. - Added
ErrNilTransactionfor nil autofill or submission inputs andErrLastLedgerSequenceFieldMustBeAbsentfor invalid Batch inner transactions. - Added X-address autofill for Account, Destination, Authorize, Unauthorize, Owner, RegularKey, Delegate, NFTokenMinter, Subject, Issuer, and Holder fields in outer and Batch inner transactions. Embedded Account and Destination tags, including tag
0, populate the matching tag field. Conflicting explicit tags returnErrMismatchedTag, and tagged X-addresses in fields without a tag counterpart returnErrAccountIDTagNotAllowed. - Added
SubmitTxAndWaitContextandSubmitTxBlobAndWaitContextwith caller cancellation across transaction preparation, submission, and finality monitoring, plus reliable-submission error sentinels for malformed preliminary results, ledger expiry, repeated monitoring transport failure, and invalid polling intervals. - Added
ErrInvalidMaxRetriesandErrInvalidLastLedgerSequencefor non-positive retry limits and zero ledger boundaries. - Added
ErrInvalidFeeValueandErrFeeHasTooManyDecimalsfor fee validation.
Changed
binary-codec
- Replaced the v0.2.0 Dynamic MPT codec definitions with the rippled 3.3.0
ImmutableFlagsfield and current MPT transaction and ledger flags. UInt64serialization is now field-aware. MPT amount fields (MaximumAmount,OutstandingAmount,MPTAmount, andLockedAmount) use quoted base-10 strings, while otherUInt64fields use hexadecimal strings.- Issued-currency amounts now accept tagless mainnet and testnet X-address issuers and encode the underlying AccountID. Issuers with embedded tags are rejected.
- Expanded the embedded protocol definitions with account-set, ledger-entry, and transaction flag maps, ledger-entry and transaction format maps, and updated protocol type and transaction result mappings.
dependencies
- Upgraded
golang.org/x/cryptoto v0.54.0 to include upstream SSH security fixes.
documentation
- Refreshed the README and contribution guide, upgraded the documentation toolchain to Docusaurus 3.10.2, and updated or pinned patched transitive documentation dependencies.
development
- Standard test and coverage targets now include
xrpl/testutil/integrationunit tests. Integration test targets now cover nested integration packages, and the localnet target runs them serially.
xrpl/queries/amm
InfoRequest.Validatenow rejectsamm_inforequests that combineamm_accountwith theassetandasset2lookup form.
xrpl/rpc
- Autofill now omits and rejects an explicit
NetworkIDfor network IDs from 0 through 1024 and for network IDs above 1024 on rippled versions before 1.11.0. It adds and requires the exactNetworkIDfor IDs above 1024 on rippled 1.11.0 or later. The same rules apply to outer and Batch inner transactions. - The client now discovers and caches network identity with
server_infobefore an identity-dependent operation. A discovery failure fails the operation without mutation and is retried by a later operation. - Client-side submission helpers now discover and validate network identity before they sign an unsigned transaction, including when autofill is disabled. Use
wallet.Signfor fully offline signing, orWithNetworkIdentitywhen trusted deployment configuration supplies the identity. - Network identity discovery now uses Clio
rippled_versiononly whenbuild_versionis absent. WithMaxRetriesnow limits consecutive incomplete finality rounds caused by query or transport failures. A complete round resets the count, and successful pending rounds do not consume the limit.- Authorized RPC requests now require a parsed HTTPS endpoint for every HTTP client, recognize header names case-insensitively and URL userinfo, and redact credential material from returned diagnostics. Standard
*http.Clientrequests also reject authenticated plaintext redirects, while customHTTPClientimplementations remain supported on HTTPS and control their own redirects.
xrpl/transaction
MPTokenIssuanceCreateandMPTokenIssuanceSetvalidation now rejects unsupportedImmutableFlagsbits and an explicitly zero mask.MPTokenIssuanceSetrejects holder-only no-op transactions, soHoldermust be paired with a lock or unlock flag.MPTokenIssuanceSet,MPTokenAuthorize, andMPTokenIssuanceDestroyalso require theirMPTokenIssuanceIDto be an exact 192-bit hexadecimal value.DelegateSetnow uses a present emptyPermissionslist to delete a Delegate object. Vault and Loan transaction types are rejected as non-delegable according to XLS-75.- Inner Batch transaction flattening now preserves the wire-required empty
SigningPubKey, and raw inner-transaction validation requires that explicit empty field. Explicit null Batch inner fields now fail where the wire requires absent or empty values. Batch.Validatenow requires 2 through 8 inner transactions.ErrBatchRawTransactionsEmptyremains a compatibility alias that matches the new count error witherrors.Is.
xrpl/websocket
- Autofill now omits and rejects an explicit
NetworkIDfor network IDs from 0 through 1024 and for network IDs above 1024 on rippled versions before 1.11.0. It adds and requires the exactNetworkIDfor IDs above 1024 on rippled 1.11.0 or later. The same rules apply to outer and Batch inner transactions. - Identity discovery or validation failures now make
Connectfail closed. Autofill and unsigned signing fail when identity data required by the target-network policy is unavailable. An omittedserver_info.network_idresolves to rippled's default network ID0. - Client-side signing now applies network identity policy when autofill is disabled.
- Network identity discovery now uses Clio
rippled_versiononly whenbuild_versionis absent. Explicit and automatic connections rediscover untrusted server identity and reject a discovered network-ID change before the socket is published. WithMaxRetriesnow limits consecutive incomplete finality rounds caused by query or transport failures. A complete round resets the count, and successful pending rounds do not consume the limit.- Documented the stream-handler concurrency, per-stream ordering, and unbuffered backpressure contract.
Fixed
address-codec
- Base58Check checksum and family-seed-prefix comparisons now run in constant time (
crypto/subtle) to avoid leaking timing information while decoding addresses and seeds.
binary-codec
UInt16transaction and ledger entry type encoding now accepts named string values, includingtransaction.TxTypevalues.- Encoding a field with an unsupported serialized type now returns a descriptive error instead of panicking.
BinaryParser.ReadBytesnow returnsErrParserOutOfBoundfor negative lengths instead of silently returning no data.DecodeQualitynow returnsErrInvalidQualityfor malformed hex input or input that decodes to fewer than 8 bytes, instead of returning raw hex errors or panicking on short input.DecodeQualitynow positions the decimal point correctly for quality values below 1.EncodeQualitynow wraps invalid decimal parsing errors withErrInvalidQuality, so callers can match the stable sentinel and inspect the underlying parsing error.EncodeQualitynow validates the complete numeric syntax before zero detection. Malformed inputs such as.or0..0no longer encode as zero and returnErrInvalidQuality, while valid zero forms such as-0and0e5now encode as the canonical zero quality.- Encoded the empty
AccountofUNLModifypseudo-transactions through a transaction-boundary raw field-value override, keeping genericSTObjectencoding transaction-agnostic and rippled-compatible.UNLModifynow accepts an absentAccount, an empty string, or the canonical XRPL zero account, including equivalent named strings, other supplied values returnErrInvalidUNLModifyAccountwithout changing caller data. Decodenow returns an error for malformedVector256fields whose byte length is not a multiple of 32 instead of panicking.
xrpl/currency
XrpToDropsandDropsToXrpnow accept valid non-canonical decimal inputs up to 1024 bytes, including long zero-padded values, while retaining bounded exponent, input-size, and native-amount range validation.
xrpl/internal/client
- Preserved recovered binary codec error identity during transaction blob decoding so callers can use
errors.Isanderrors.As, while converting non-error panic values to ordinary errors. - Centralized Batch inner traversal and validation for RPC and WebSocket autofill, and removed the duplicate NetworkID policy application.
- Shared DeliverMax conflict, signed-Batch count, non-multisigned transaction, Batch structure, and NetworkID validation error identities across both public clients.
errors.Iscan match corresponding shared sentinels from either client package. - Normalized the Batch transaction count error text to the Go error-string convention while preserving sentinel identity.
xrpl/hash
SignTxandSignTxBlobnow calculate transaction IDs forEnableAmendment,SetFee, andUNLModifypseudo-transactions with an absent or emptySigningPubKeyand noTxnSignatureorSigners. Named stringTransactionTypemap values are supported without changing caller data.
keypairs
- Key algorithm detection now validates the requested key type, complete hexadecimal encoding, prefix, and exact length before selecting Ed25519 or secp256k1. Signing supports raw and
00-prefixed secp256k1 private keys, verification and classic-address derivation support Ed25519 and compressed secp256k1 public keys. DeriveClassicAddressnow rejects unsupported public-key formats withErrInvalidPublicKeyFormatinstead of hashing any decodable 33-byte value.- secp256k1 signing now rejects zero and out-of-range private scalars instead of reducing them modulo the curve order.
- secp256k1 verification now rejects malleable high-S signatures that do not meet XRPL's fully canonical signature requirement.
DeriveClassicAddressnow verifies that compressed secp256k1 public keys encode valid curve points before address hashing.
xrpl/transaction
OracleSetnow omits the defaultScalevalue of zero from flattened price data, as required by the server object template.- Fixed
DelegateSetvalidation to rejectBatchpermissions as required by XLS-75. - Named string
TransactionTypevalues now work consistently throughFlatTransactionvalidation, special fee selection, Batch inner processing, submission policy, and binary encoding. Malformed values remain rejected.
xrpl/transaction/types
- Rejected currency amount JSON that combines
mpt_issuance_idwith issued-currencycurrencyorissuerfields.
xrpl/wallet
SignMultiBatchandCombineBatchSignersnow implementBatchV1_1signing from xrpld 3.3.0. Batch signatures bind the outer account and sequence or ticket value, support innerDelegateandCounterpartyauthorizers, bind nested multisigner accounts, and reject fragments with different signed outer fields.CombineBatchSignerssorts fragments by outer Batch signer account and keeps the first fragment for each duplicate account; it does not merge nestedSignersarrays. Flat Batch transactions acceptFlags,Sequence, andTicketSequencevalues of any whole-number Go type.
xrpl/rpc
- AccountDelete autofill now runs blocker checks for plain and named string Account values, including values converted from X-addresses.
- Concurrent callers now share one in-flight network identity discovery result, including failures, while later independent operations can retry.
- Rippled prerelease versions with numeric suffixes now compare the suffix numerically.
- Made autofill and unsigned signing fail closed when network identity discovery or validation fails, unless
WithNetworkIdentitysupplies an explicit trusted identity. - Rejected nil custom HTTP clients during configuration and request-time revalidation with
ErrNilHTTPClientinstead of allowing request-time panics. - Redacted bare authorization credentials and percent-encoded URL passwords from authorized RPC request errors.
- Authorized RPC redirects now reject an HTTPS-to-HTTP downgrade before invoking the caller's
CheckRedirect, so a callback never observesAuthorizationon a plaintext target. - Account-only
amm_inforequests now omit emptyassetandasset2selectors from the RPC payload. - Corrected fee precision and rounding with shared exact rational arithmetic, including fractional base fees and load factors, rippled-compatible integer
EscrowFinishfulfillment scaling, final whole-drop half-up rounding, validated-ledgerLoanSetsigner data, and presence-aware zero base and owner-reserve fees. - Made submit options nil-safe without enabling autofill by default. Forced
fail_hardforAccountDelete. The standardmaxFeeXRPcap now applies. Normalized PaymentDeliverMaxto wireAmount. Prevented autofill and submission failures from changing caller-owned maps. AutofillMultisignednow preserves a suppliedFee, when absent, it calculates the fee once with the signer count.SubmitTxBlobAndWaitnow decodes the signed blob once and uses the decoded transaction for preflight and hashing.- Autofill now normalizes named string address values, such as
types.Address, before account checks. - Rejected tagged X-addresses for fields that cannot represent tags instead of silently discarding the embedded tag.
- Signed Batch blob submission now rejects a malformed inner transaction (non-empty
TxnSignature/Signers, or a missing inner-Batch form) even when the outer signature is valid. - Batch fee calculation now rejects a nested
Batchbefore recursive fee calculation. - Made reliable-submission outcomes ledger-driven: require a positive
LastLedgerSequence, reject non-positive maximum retry values, reject missing preliminary engine results and preliminarytemresults, retry exacttxnNotFoundresponses, and return every validated transaction response without an error. Each polling round verifies the latest validated ledger, performs a final transaction lookup, and reports expiry only when that lookup remains inconclusive after the ledger passesLastLedgerSequence. Expiry errors retain the preliminary engine result, and negative polling intervals fail before submission.
xrpl/testutil
- Local integration wallet funding now waits for a validated
tesSUCCESSresult before it returns, preventing later validated-ledger autofill requests from observing an unfunded account.
xrpl/websocket
- Corrected fee precision and rounding with shared exact rational arithmetic, including fractional base fees and load factors, rippled-compatible integer
EscrowFinishfulfillment scaling, final whole-drop half-up rounding, validated-ledgerLoanSetsigner data, and presence-aware zero base and owner-reserve fees. - Pending requests now return
ErrDisconnectedimmediately on connection loss or write failure and are never replayed after reconnection. A request timeout covers both its write and response wait. Write deadlines are cleared on all completion paths, and cancellation after a completed write does not invalidate the healthy socket. Stale read failures do not close replacement sockets, and disconnecting an idle client succeeds. - Reconnection exhaustion now unwraps the last connection or identity failure while preserving
errors.Aschecks forErrMaxReconnectionAttemptsReached. - Made connection-time network discovery atomic and leak-free. Reconnecting sockets remain private and application requests remain gated until identity checks finish. Cancellation closes in-progress connection attempts, and failed attempts cannot replace a live connection. After a prior socket is lost or disconnected, a successful manual
Connectcancels the old reader lifecycle and fails its pending requests withErrDisconnectedbefore publishing the new socket. - AccountDelete autofill now runs blocker checks for plain and named string Account values, including values converted from X-addresses.
- Identity discovery now accepts out-of-order frames, replays buffered stream messages, and clears temporary read deadlines after failed reads. The client timeout now bounds the whole connection handshake, covering the WebSocket dial and identity discovery in a single window, for both
Connectand automatic reconnects. - Made autofill and unsigned signing reject public network identity values until successful discovery, unless
WithNetworkIdentitysupplies an explicit trusted override. - Autofill now normalizes named string address values, such as
types.Address, before account checks. - Rejected tagged X-addresses for fields that cannot represent tags instead of silently discarding the embedded tag.
- Signed Batch blob submission now rejects a malformed inner transaction (non-empty
TxnSignature/Signers, or a missing inner-Batch form) even when the outer signature is valid. - Batch fee calculation now rejects a nested
Batchbefore recursive fee calculation. - Made submit options nil-safe without enabling autofill by default. Forced
fail_hardforAccountDelete. The standardmaxFeeXRPcap now applies. Normalized PaymentDeliverMaxto wireAmount. Prevented autofill and submission failures from changing caller-owned maps. AutofillMultisignednow preserves a suppliedFee, when absent, it calculates the fee once with the signer count.SubmitTxBlobAndWaitnow decodes the signed blob once and uses the decoded transaction for preflight and hashing.- Matched RPC reliable-submission outcomes: require a positive
LastLedgerSequence, reject non-positive maximum retry values, reject missing preliminary engine results and preliminarytemresults, retry exacttxnNotFoundresponses, and return every validated transaction response without an error. Each polling round verifies the latest validated ledger, performs a final transaction lookup, and reports expiry only when that lookup remains inconclusive after the ledger passesLastLedgerSequence. Expiry errors retain the preliminary engine result, and negative polling intervals fail before submission. - Closed and invalidated WebSocket connections after write or write-deadline failures. The active read loop now attempts reconnection after any read error, not only close errors, within the existing
WithMaxReconnectsbudget. - Made manual disconnect claim an in-progress reconnect socket before lifecycle cancellation so cancellation-driven invalidation cannot cause a false not-connected error.
- Made reconnect backoff configuration immutable per client to prevent concurrent clients and reconnect tests from racing over shared delay state.
- Preserved per-handler serialization across manual disconnects and later connections by waiting for detached handler runners before starting replacements.
Client.Requestnow preserves custom JSON from request types that implementjson.Marshaler, including flattened and object-form selectors, while retaining exact JSON number values before transport fields are added.- Preserved
validated,domain, and MPT issuance identifiers in typedbookChangesnotifications. - Dispatched
bookChangesnotifications to the exported book-changes handler with typed decoding and no duplicate handler delivery across reconnects. Automatic reconnects do not replay subscriptions, so callers must resubscribe.