Skip to main content

MoxieWalletClient

Description

MoxieWalletClient is a class that provides methods to interact with the Moxie agent's embedded wallet.

Type Signature

class MoxieWalletClient {
constructor(address: string, bearerToken?: string);

async signMessage(
message: string
): Promise<MoxieWalletSignMessageResponseType>;

async signTypedData(
domain: Record<string, any>,
types: Record<string, any>,
message: Record<string, any>,
primaryType: string
): Promise<MoxieWalletSignTypedDataResponseType>;

async sendTransaction(
chainId: string,
transactionDetails: TransactionDetails
): Promise<MoxieWalletSendTransactionResponseType>;
}

Methods

NameTypeDescription
signMessageasync (message: string) => Promise<MoxieWalletSignMessageResponseType>Sign a message with the agent's wallet
signTypedDataasync (domain: Record<string, any>, types: Record<string, any>, message: Record<string, any>, primaryType: string) => Promise<MoxieWalletSignTypedDataResponseType>Sign a typed data with the agent's wallet
sendTransactionasync (chainId: string, transactionDetails: TransactionDetails) => Promise<MoxieWalletSendTransactionResponseType>Send a transaction with the agent's wallet