@monad-agent-kit/plugin-nft
v0.1.1
Published
NFT plugin for Monad Agent Kit - ERC-721 operations
Downloads
9
Maintainers
Readme
@monad-agent-kit/plugin-nft
NFT operations plugin for Monad Agent Kit — query, transfer, and get metadata for ERC-721 NFTs.
Installation
bun add @monad-agent-kit/core @monad-agent-kit/plugin-nftUsage
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)Actions
getNFTs
Query ERC-721 NFTs owned by an address.
const result = await agent.execute("getNFTs", {
contractAddress: "0x...",
address: "0x...", // optional, defaults to agent wallet
})
// result.data = { nfts: [{ tokenId: "1", contractAddress: "0x..." }], count: 1 }transferNFT
Transfer an ERC-721 NFT to another address.
await agent.execute("transferNFT", {
contractAddress: "0x...",
tokenId: "42",
to: "0x...",
})getNFTMetadata
Get metadata for a specific NFT including name, symbol, tokenURI, and parsed metadata.
const result = await agent.execute("getNFTMetadata", {
contractAddress: "0x...",
tokenId: "42",
})
// result.data = { name: "My NFT", symbol: "MNFT", tokenURI: "ipfs://...", metadata: { ... } }Exports
import {
nftPlugin, // Plugin object
getNFTsAction, // Individual actions
transferNFTAction,
getNFTMetadataAction,
erc721Abi, // Standard ERC-721 ABI
} from "@monad-agent-kit/plugin-nft"License
MIT
