You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
Develop a new set of APIs in our SDKs to allow application builders to easily chain multiple Move operations in a single transaction.
Out of Scope
In this AIP, we will focus solely on the transaction-building aspect. While this solution aims to enhance the composability of our ecosystem as part of the Aptos Intent standard, those standards will be proposed in future AIPs. This AIP will serve as a reference for those later efforts.
High-level Overview
Currently, there are two ways to interact with the Aptos Blockchain:
EntryFunction Payload: Developers need only specify the function name they want to invoke and pass the corresponding arguments to the SDK.
Script Payload: Developers require a Move compiler to compile Move scripts into a compiled format, which is then used as the transaction payload.
These two approaches offer significantly different developer experiences. EntryFunctionPayload is easy to build using our provided SDK, but requires the developer to deploy the entry function to the blockchain upfront, limiting composability. Script Payload provides full expressivity, allowing developers to call and compose any on-chain Move functions. However, it requires the use of the full Move compiler, which may not be practical in a browser-based environment. Currently, the only practical way to use a script is to compile it once, store the compiled bytes in binary format, and use that format in the SDK on the client side.
Ideally, we want a solution that strikes a balance between these two approaches: allowing developers to easily compose Move functions in transactions on the client side without needing the entire Move compiler.
We present the Dynamic Transaction Composer to address this challenge. The transaction builder API will be integrated into the SDK, allowing developers to chain multiple Move calls into a single transaction. The builder will be implemented in Rust, which will generate compiled Move script bytes directly from a sequence of Move calls, without requiring the full Move compiler or source code. This builder will be bundled into WASM for seamless integration into our TypeScript SDK.
Additionally, we will introduce annotation logic to the indexer API so that the indexer/explorer can display the script in a format that looks like the chained function calls. This can be achieved by implementing a decompiler that reverse-engineers the code generation logic.
AIP Discussion
Summary
Develop a new set of APIs in our SDKs to allow application builders to easily chain multiple Move operations in a single transaction.
Out of Scope
In this AIP, we will focus solely on the transaction-building aspect. While this solution aims to enhance the composability of our ecosystem as part of the Aptos Intent standard, those standards will be proposed in future AIPs. This AIP will serve as a reference for those later efforts.
High-level Overview
Currently, there are two ways to interact with the Aptos Blockchain:
EntryFunction Payload: Developers need only specify the function name they want to invoke and pass the corresponding arguments to the SDK.
Script Payload: Developers require a Move compiler to compile Move scripts into a compiled format, which is then used as the transaction payload.
These two approaches offer significantly different developer experiences. EntryFunctionPayload is easy to build using our provided SDK, but requires the developer to deploy the entry function to the blockchain upfront, limiting composability. Script Payload provides full expressivity, allowing developers to call and compose any on-chain Move functions. However, it requires the use of the full Move compiler, which may not be practical in a browser-based environment. Currently, the only practical way to use a script is to compile it once, store the compiled bytes in binary format, and use that format in the SDK on the client side.
Ideally, we want a solution that strikes a balance between these two approaches: allowing developers to easily compose Move functions in transactions on the client side without needing the entire Move compiler.
We present the Dynamic Transaction Composer to address this challenge. The transaction builder API will be integrated into the SDK, allowing developers to chain multiple Move calls into a single transaction. The builder will be implemented in Rust, which will generate compiled Move script bytes directly from a sequence of Move calls, without requiring the full Move compiler or source code. This builder will be bundled into WASM for seamless integration into our TypeScript SDK.
Additionally, we will introduce annotation logic to the indexer API so that the indexer/explorer can display the script in a format that looks like the chained function calls. This can be achieved by implementing a decompiler that reverse-engineers the code generation logic.
Read more about it here: https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-102.md
The text was updated successfully, but these errors were encountered: