Quick start
Last updated
Last updated
Using the UXLINK Account, you can invoke other contracts to execute custom business logic.
The process for initiating a transaction is as follows:
Submit Execute Data.
Redirect to the user password verification page, where the user enters their password. Upon successful verification, the transaction is sent to the blockchain.
After the transaction is executed, callback to replaceUrl and query the transaction result through the order query interface.
1. Submitting an Order
The interface for submitting an order is as follows: POST /oneAccount/v1/sendExecuteData
Request Body:
Response:
1.1 Generating executeData
Creating executeData requires the ABI of the corresponding business contract. As this file is too large to be conveniently passed through the interface, it needs to be generated by the project side. Here is a function for generating it:
2. Redirecting to the User Password Verification Page
After obtaining the orderId, redirect to:
Upon the user entering the password on the verification page and successful validation by the server, the transaction data corresponding to this orderId will be submitted to the blockchain for execution of the relevant business logic.
3. Querying Transaction Results
Upon successful execution of the transaction after the user enters the password on the verification page, the page will redirect to replaceUrl with the orderId.
To query the execution result, use the transaction status query interface:
Interface: /aaWallet/v1/getTransactionResult
Request Body:
Response: