fix(client#MethodOptions): add overrideable params#1293
Merged
Ryang-21 merged 1 commit intostellar:masterfrom Dec 2, 2025
Merged
fix(client#MethodOptions): add overrideable params#1293Ryang-21 merged 1 commit intostellar:masterfrom
Ryang-21 merged 1 commit intostellar:masterfrom
Conversation
This supercedes stellar#1283, adding `publicKey`, `signTransaction`, and `signAuthEntry` as optional parameters on `MethodOptions`. This is actually the type of each method added to a Client ([[1]]), and needs to allow overriding these settings. This will allow us to fix the generated TS Bindings and specify `MethodOptions` as the `options` type, rather than `AssembledTransactionOptions`, which causes errors since these settings (as well as `contractId`) are all **required**, but should not be required for Client methods. [1]: https://github.com/theahaco/js-stellar-sdk/blob/f1f81f7870affb444c1d2a289c1a272f01410346/src/contract/client.ts#L27
Contributor
Author
|
The build failures seem unrelated to this change? |
chadoh
added a commit
to theahaco/stellar-cli
that referenced
this pull request
Nov 26, 2025
This is an update to stellar#2283, which changed hard-coded `options` to `AssembledTransactionOptions`. This was not quite correct, it should be a `MethodOptions`. This works together with stellar/js-stellar-sdk#1293 to finally remove the need for `@ts-expect-error` lines in our canonical write-method invocation examples.
Ryang-21
approved these changes
Dec 1, 2025
Contributor
Ryang-21
left a comment
There was a problem hiding this comment.
Looks good these should make the Client binding methods easier to override
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This supercedes #1283, adding
publicKey,signTransaction, andsignAuthEntryas optional parameters onMethodOptions. This is actually the type of each method added to a Client ([1]), and needs to allow overriding these settings.This will allow us to fix the generated TS Bindings and specify
MethodOptionsas theoptionstype, rather thanAssembledTransactionOptions, which causes errors since these settings (as well ascontractId) are all required, but should not be required for Client methods.