NFT plugin for Monad Agent Kit - ERC-721 operations
npm install @monad-agent-kit/plugin-nftNFT operations plugin for Monad Agent Kit — query, transfer, and get metadata for ERC-721 NFTs.
``bash`
bun add @monad-agent-kit/core @monad-agent-kit/plugin-nft
`typescript
import { MonadAgentKit } from "@monad-agent-kit/core"
import { nftPlugin } from "@monad-agent-kit/plugin-nft"
const agent = new MonadAgentKit({ privateKey: "0x..." })
await agent.use(nftPlugin)
`
Query ERC-721 NFTs owned by an address.
`typescript`
const result = await agent.execute("getNFTs", {
contractAddress: "0x...",
address: "0x...", // optional, defaults to agent wallet
})
// result.data = { nfts: [{ tokenId: "1", contractAddress: "0x..." }], count: 1 }
Transfer an ERC-721 NFT to another address.
`typescript`
await agent.execute("transferNFT", {
contractAddress: "0x...",
tokenId: "42",
to: "0x...",
})
Get metadata for a specific NFT including name, symbol, tokenURI, and parsed metadata.
`typescript`
const result = await agent.execute("getNFTMetadata", {
contractAddress: "0x...",
tokenId: "42",
})
// result.data = { name: "My NFT", symbol: "MNFT", tokenURI: "ipfs://...", metadata: { ... } }
`typescript``
import {
nftPlugin, // Plugin object
getNFTsAction, // Individual actions
transferNFTAction,
getNFTMetadataAction,
erc721Abi, // Standard ERC-721 ABI
} from "@monad-agent-kit/plugin-nft"
MIT