Learn how to authenticate users, create embedded wallets, and send transactions in your Swift app.
sendCode
method.
Note: you must provide the phone number in E.164 format.
sendCode
will not throw an error.
If the provided phone number is invalid, or sending the OTP fails, sendCode
will throw an error.
loginWithCode
method. Pass the following parameters to this method:
loginWithCode
will return the PrivyUser
.
If the provided OTP/phone number combination is invalid, loginWithCode
will throw an error that speicfies the error reason.
PrivyUser.createEthereumWallet
.personal_sign
).Once you have an instance of an EmbeddedEthereumWallet
, you can make RPC requests by using the provider: EmbeddedEthereumWalletProvider
hook and using its request
method. For example, wallet.provider.request(request: rpcRequest)
.EthereumRpcRequest
object that contains:personal_sign
)