@moonup/viem
@moonup/viem Package Documentation
The @moonup/viem
package is a utility package that allows for the creation of a local account using the MoonSDK from the @moonup/moon-sdk
package. This local account can be used with the viem
library for signing messages, transactions, and typed data.=
Installing Moon Viem:
To utilize the Moon Viem package, first install it to the desired directory of the project:
To install Moon Viem:
Usage Examples
Here's a basic example of how to use the createMoonAccount
function:
API Reference
createMoonAccount
createMoonAccount
Creates a local account using the MoonSDK.
Parameters
input
(Object)sdk
(MoonSDK): An instance of the MoonSDK.ethereumAddress
(string): The Ethereum address of the account.
Returns
A promise that resolves to a LocalAccount
object.
Example
Last updated