Skip to content
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

Transaction builder in Typescript #23

Open
karczuRF opened this issue Jul 9, 2024 · 0 comments
Open

Transaction builder in Typescript #23

karczuRF opened this issue Jul 9, 2024 · 0 comments

Comments

@karczuRF
Copy link
Contributor

karczuRF commented Jul 9, 2024

Create Typescript Transaction Builder.
This should look sth like this:

new TransactionBuilder()
  .callMethod(account.withdraw, [XTR2, new BigNumber(10)])
  .putLastInstructionOutputOnWorkspace("fee")
  .callMethod(component.withdraw, [new Workspace(“fee”), new BigNumber(1)])
….
  .build();

In above, the methods like account.withdraw should be typed like something like TariComponentMethodDescriptor and

callMethod<T extends TariComponentMethodDescriptor>(method: T[“method”], argos: T[“args”])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant