{% hint style="danger" %} Most of the wallet functionality is insecure / meant for development testing. To connect Wallets with Dapps/Dgames securely, we bring the open communications protocol for web3 into Unreal Engine. Please check WalletConnect. {% endhint %}
The following functions are members of DefiWalletCoreActor. The Target should be Defi Wallet Core Actor.
Restore wallet with mnemonics and password.
Mnemonics
: mnemonics to restorePassword
: salt in mnemonics restorationOutput
: generated address (index=0)Success
: whether succeed or notOutput Message
: error message, "" if succeed
Create a new wallet with password and wordcount.
Password
: salt in mnemonics restorationWordcount
: mnemonics word count (12, 18, 24)Output
: generated address (index=0)Success
: whether succeed or notOutput Message
: error message, "" if succeed
Get backup mnemonic phrase.
Output
: backup mnemonicsSuccess
: whether succeed or notOutput Message
: error message, "" if succeed
Generate mnemonics.
Password
: salt in mnemonics restorationWordcount
: mnemonics word count (12, 18, 24)Output
: generated mnemonicsSuccess
: whether succeed or notOutput Message
: error message, "" if succeed
Get eth address with index
Index
: wallet index which starts from 0Output
: get eth addressSuccess
: whether succeed or notOutput Message
: error message, "" if succeed
Get eth balance
Address
: eth addressOutput
: get balanceSuccess
: whether succeed or notOutput Message
: error message, "" if succeed
Sign eth amount
Wallet Index
: wallet index which starts from 0Fromaddress
: sender addressToaddress
: receiver addressAmount
: amount in eth decimal, eg. 0.1 means 0.1 ethGas Limit
: gas limit, fee= gasLimit * gasPriceGas Price
: gas price in wei, eg. 1wei= 1/(10^18)eth 1wei=1/(10^9)gweiTxdata
: optional dataSuccess
: whether succeed or notOutput Message
: error message, "" if succeedReturn Value
: signed transaction as bytes
Send eth amount
Wallet Index
: wallet index which starts from 0Fromaddress
: sender addressToaddress
: receiver addressAmount in Eth Decimal
: amount in eth decimal, eg. 0.1 means 0.1 ethGas Limit
: gas limit, fee= gasLimit * gasPriceGas Price in Wei
: gas price in wei, eg. 1wei= 1/(10^18)eth 1wei=1/(10^9)gweiTxdata
: optional dataOut
: SendEthAmount callback
Sign eth login
Wallet Index
: wallet index which starts from 0Document
: document to signSignature
: get signatureSuccess
: whether succeed or notOutput Message
: error message, "" if succeed
Verify eth login
Document
: document to verifySignature
: signature to verifySuccess
: whether succeed or notOutput Message
: error message, "" if succeed