-
Notifications
You must be signed in to change notification settings - Fork 0
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
Client return types #3
Conversation
Ryang-21
commented
Feb 27, 2024
•
edited
Loading
edited
- Changed client function return type to the xdr of the operation
- Made client parsers accessible
- exported contract errors and nativeToScVal
- updated contract specs
src/index.ts
Outdated
@@ -1,7 +1,8 @@ | |||
export * from "./governor.js"; | |||
export * from "./votes.js"; | |||
export * from "./contract_result.js"; | |||
|
|||
export * from "./contract_error.js"; | |||
export { nativeToScVal } from "@stellar/stellar-sdk"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
am OK with letting this workaround go by, but part of me thinks we should try transforming the incoming Array<any>
into:
arg: string[]
fn {
real_arg = arg.map // map string to xdr.ScVal
}
That way users of the SDK have a clear parameter type (we probs need to add a comment explaining what kind of string it is)
else { | ||
result.result = new Ok(undefined as T); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!