Skip to main content

agentWallet

Description

agentWallet state returns info and metadata of Senpi user's agent wallet that can be used to execute transactions and sign messages.

This state will simply return JSON object, thus if you're looking to execute transactions or sign messages, you can use the moxieWalletClient state instead.

Usage

import { MoxieClientWallet } from "@moxie-protocol/moxie-agent-lib";

const agentWallet: MoxieClientWallet = state.agentWallet;

Response

{
"address": "0xa5cc845ef113c4c0908d4c1f4616a000b9a67b80",
"chainType": "ethereum",
"chainId": "8453",
"walletType": "embedded",
"walletClientType": "privy",
"connectorType": "embedded",
"hdWalletIndex": 0,
"delegated": false
}

Type Signature

interface Wallet {
id?: string | null;
address: string;
chainId?: string;
walletType?: string;
walletClientType?: string;
connectorType?: string;
hdWalletIndex?: number;
imported?: boolean;
delegated?: boolean;
}

Fields

NameTypeDescription
addressstringThe address of the wallet
chainTypestringThe type of the chain
chainIdstringThe ID of the chain
walletTypestringThe type of the wallet
walletClientTypestringThe type of the wallet client
connectorTypestringThe type of the connector
hdWalletIndexnumberThe index of the HD wallet
delegatedbooleanWhether the wallet is delegated