TransferSUI
Transfer SUI to another wallet address.
Parameters
to_publickey|string
- The receiver wallet address
amount|int
- The transfer amount
approveFinish|Action
- This action will be invoked after the user completes the permission verification in the approval process. You can use it to provide UI prompts. For example, in a game, after calling the current API, you can immediately display a "Waiting" UI. The SDK will then automatically pop up the permission verification interface. When the user enters the password on the interface and clicks "Return," this action will be called to close the previous "Waiting" UI.
action|Action<CommonResponse<SUIResTransferSUI>>
- The callback function of this method is used to receive the results.
Return
response class
- CommonResponse<SUIResTransferSUI>
Code Example
int amount = 1;string toPublicKey = "to publick key";Action approveFinished = null;MWSDK.SUI.Wallet.TransferSUI(toPublicKey, amount, approveFinished, (res) =>{ CommonResponse<SUIResTransferSUI> resObj = res; long http_status_code = resObj.http_status_code; string message = resObj.message; SUIResTransferSUI data = resObj.data; PrintLog("result:" + JsonUtility.ToJson(res));});
Edit this page on GitHub