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

[Feature] Enable building valid transactions without submitting them to the network #808

Closed

Conversation

iamalwaysuncomfortable
Copy link
Collaborator

Motivation

This PR adds the ability to build valid execution transactions without immediately submitting them to the network. This allows transactions to be built beforehand and then later submitted to the network.

The following methods have been introduced to build transactions offline. Each will return a Transaction object which is a wasm object representing an Aleo transaction. Users can use the toString() method on this object to get a human readable string representation of the Transaction.

buildExecutionTransaction - Build an execution transaction for an arbitrary execution
buildTransferTransaction - Build an transfer transaction for any of the 4 transaction types
buildTransferPublicTransaction - Build a transfer public transaction
buildBondPublicTransaction - Build a bond public transaction to bond as a delegator or validator to the network
buildUnbondPublicTransaction - Build an unbond public transaction
buildClaimUnbondPublicTransaction - Build a transaction to claim unbonded stake

If the fee for a transaction is paid publicly (with the fee_public method) and the function being executed doesn't take any records as input, the transaction can be built completely offline without connection to the internet.

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

Successfully merging this pull request may close these issues.

1 participant