Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bindings-ts)!: require configuring network settings (stellar#852)
* feat(bindings-ts)!: require configuring network settings Generated libraries now export a `Contract` class that needs to be instantiated by the user with RPC URL, Network Passphrase, and contract ID. * feat(bindings-ts): add test config for generated fixtures * feat: test drive error-parsing in client libs this logic was totally broken! thanks for showing us, tests. * chore: add failing custom type test * chore: demonstrate complex enum shortcomings you can see here that - the input needs the `as const` - but to make that work for complex types, a `readonly` is needed in the typing additionally, the input and output are typed differently: - the input needs to be wrapped in an array - the output does not also, for enums that do not have `values`, you still need to specify `values: undefined` * chore: demonstrate many struct encoding problems * chore: demonstrate many struct encoding problems * feat: no more need for `Method` suffix When we exported functions for each method, we needed to make sure we only used safe JS words. This no longer matters, since they're exposed as methods on the `Contract` class. Since this change required rebuilding the snapshot, I also made sure the `readonly` settings were added to the source, rather than manually to the snapshot. * chore: finish testing all custom_type methods * chore: remove placeholder signing machinery * feat: add `networks` export to generated library * chore: update generated README * chore: fix formatting of generated file * build: appease clippy * docs: remove outdated '--name' from example * docs: fix example in doc comment Re: https://typedoc.org/tags/example/, it is best to use both `@example` and the triple-backtick code block * build: update snapshot build command * docs: improve method-options TSDoc --------- Co-authored-by: Willem Wyndham <willem@ahalabs.dev>
- Loading branch information