Comprehensive function reference for UmiAgentKit
Enable AI functionality with Groq integration.
const ai = kit.enableAI({
groqApiKey: 'your-groq-api-key',
model: 'llama3-70b-8192', // Optional
temperature: 0.1, // Optional
maxTokens: 8192 // Optional
});Parameters:
groqApiKey(string) - Your Groq API keymodel(string) - AI model to use (default: 'llama3-70b-8192')temperature(number) - Response creativity (0.0-1.0)maxTokens(number) - Maximum response length
Returns: AI configuration object
Main AI interface - talk naturally to your blockchain.
const response = await kit.chat("Create a gaming token with 1M supply");
console.log(response.message); // AI response
console.log(response.actions); // Blockchain actions executedParameters:
message(string) - Natural language command
Returns: Object with message, actions, and context
Configure AI behavior for different scenarios.
kit.configureAI('gaming'); // Gaming-focused responses
kit.configureAI('production'); // Precise, reliable responses
kit.configureAI('quick'); // Fast, concise responses
kit.configureAI('conversational'); // Detailed explanationsParameters:
preset(string) - Preset configuration namecustomConfig(object) - Optional custom configuration
Presets: 'gaming', 'production', 'quick', 'conversational', 'custom'
Set context for personalized AI responses.
kit.setAIContext('defaultWallet', wallet.getAddress());
kit.setAIContext('projectName', 'Epic RPG Game');
kit.setAIContext('userRole', 'game-developer');Parameters:
key(string) - Context keyvalue(any) - Context value
Create a new wallet with private key.
const wallet = kit.createWallet();
console.log(wallet.getAddress()); // EVM address
console.log(wallet.getMoveAddress()); // Move address
console.log(wallet.getPrivateKey()); // Private key (keep secure!)Returns: UmiWallet object
Import existing wallet from private key.
const wallet = kit.importWallet('0x123...');Parameters:
privateKey(string) - Hexadecimal private key
Returns: UmiWallet object
Get ETH balance for any address.
const balance = await kit.getBalance(wallet.getAddress());
console.log(`Balance: ${balance} ETH`);Parameters:
address(string) - Wallet address to check
Returns: Promise - Balance in ETH
Send ETH between wallets.
await kit.transfer({
from: fromWallet,
to: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
amount: '1.5'
});Parameters:
from(UmiWallet) - Sender walletto(string) - Recipient addressamount(string) - Amount in ETH
Returns: Promise - Transaction result
Create ERC-20 tokens with real-time compilation.
const token = await kit.createERC20Token({
deployerWallet: wallet,
name: 'GameCoin',
symbol: 'GAME',
decimals: 18,
initialSupply: 1000000
});Parameters:
deployerWallet(UmiWallet) - Wallet to deploy fromname(string) - Collection namesymbol(string) - Collection symbolmaxSupply(number) - Maximum NFT supplymintPrice(string) - Price per NFT in ETHbaseURI(string) - Base URI for metadata
Returns: Promise - Deployed NFT collection details
Mint individual NFTs.
const nft = await kit.mintNFT({
ownerWallet: wallet,
contractAddress: collection.contractAddress,
to: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
tokenId: 1,
metadataURI: 'https://api.epicgame.com/heroes/1'
});Parameters:
ownerWallet(UmiWallet) - Contract owner walletcontractAddress(string) - NFT contract addressto(string) - Recipient addresstokenId(number) - Unique token IDmetadataURI(string) - Metadata URI for the NFT
Returns: Promise - Mint transaction result
Create Move-based NFT collections.
const moveCollection = await kit.createMoveNFTCollection({
deployerWallet: wallet,
name: 'Move Heroes',
description: 'Epic heroes on Move VM',
maxSupply: 5000
});Parameters:
deployerWallet(UmiWallet) - Wallet to deploy fromname(string) - Collection namedescription(string) - Collection descriptionmaxSupply(number) - Maximum NFT supply
Returns: Promise - Deployed Move NFT collection
Mint Move NFTs with gaming attributes.
const moveNFT = await kit.mintMoveNFT({
ownerWallet: wallet,
moduleAddress: moveCollection.moduleAddress,
recipient: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
tokenId: 1,
name: 'Dragon Slayer',
description: 'Legendary warrior hero',
imageURI: 'https://api.epicgame.com/heroes/dragon-slayer.png',
attributes: [
{ trait_type: 'Strength', value: 95 },
{ trait_type: 'Magic', value: 88 },
{ trait_type: 'Speed', value: 77 }
],
level: 1,
rarity: 'legendary'
});Parameters:
ownerWallet(UmiWallet) - Contract owner walletmoduleAddress(string) - Move module addressrecipient(string) - Recipient addresstokenId(number) - Unique token IDname(string) - NFT namedescription(string) - NFT descriptionimageURI(string) - Image URIattributes(array) - Gaming attributeslevel(number) - Character levelrarity(string) - Rarity tier
Returns: Promise - Mint transaction result
Create ERC-1155 multi-token collections.
const collection = await kit.createERC1155Collection({
deployerWallet: wallet,
name: "Epic Game Items",
symbol: "EGI",
baseURI: "https://api.epicgame.com/metadata/",
owner: wallet.getAddress()
});Parameters:
deployerWallet(UmiWallet) - Wallet to deploy fromname(string) - Collection namesymbol(string) - Collection symbolbaseURI(string) - Base URI for metadataowner(string) - Collection owner address
Returns: Promise - Deployed ERC-1155 collection
Create a new token type within existing collection.
const weaponToken = await kit.createERC1155Token({
ownerWallet: wallet,
contractAddress: collection.contractAddress,
metadataURI: "https://api.epicgame.com/metadata/sword.json",
maxSupply: 1000,
mintPrice: "0.01"
});Parameters:
ownerWallet(UmiWallet) - Contract owner walletcontractAddress(string) - ERC-1155 contract addressmetadataURI(string) - Token metadata URImaxSupply(number) - Maximum supply for this token typemintPrice(string) - Price per token in ETH
Returns: Promise - Token creation result with tokenId
Mint specific amounts of a token type.
await kit.mintERC1155Token({
ownerWallet: wallet,
contractAddress: collection.contractAddress,
to: playerAddress,
tokenId: weaponToken.tokenId,
amount: 10,
paymentRequired: true
});Parameters:
ownerWallet(UmiWallet) - Contract owner walletcontractAddress(string) - ERC-1155 contract addressto(string) - Recipient addresstokenId(number) - Token type ID to mintamount(number) - Amount to mintpaymentRequired(boolean) - Whether payment is required
Returns: Promise - Mint transaction result
Mint multiple different token types in one transaction.
await kit.batchMintERC1155({
ownerWallet: wallet,
contractAddress: collection.contractAddress,
to: newPlayerAddress,
tokenIds: [swordTokenId, shieldTokenId, goldTokenId],
amounts: [1, 1, 100],
paymentRequired: true
});Parameters:
ownerWallet(UmiWallet) - Contract owner walletcontractAddress(string) - ERC-1155 contract addressto(string) - Recipient addresstokenIds(array) - Array of token type IDsamounts(array) - Array of amounts to mintpaymentRequired(boolean) - Whether payment is required
Returns: Promise - Batch mint transaction result
Transfer tokens between addresses.
await kit.transferERC1155({
fromWallet: playerWallet,
contractAddress: collection.contractAddress,
to: anotherPlayerAddress,
tokenId: healthPotionTokenId,
amount: 5
});Parameters:
fromWallet(UmiWallet) - Sender walletcontractAddress(string) - ERC-1155 contract addressto(string) - Recipient addresstokenId(number) - Token type ID to transferamount(number) - Amount to transfer
Returns: Promise - Transfer transaction result
Check token balance for an address.
const balance = await kit.getERC1155Balance({
contractAddress: collection.contractAddress,
address: playerAddress,
tokenId: swordTokenId
});Parameters:
contractAddress(string) - ERC-1155 contract addressaddress(string) - Address to check balance fortokenId(number) - Token type ID
Returns: Promise - Token balance
Register wallets for multisig operations.
const walletNames = kit.registerMultisigWallets({
ceo: ceoWallet,
developer: devWallet,
artist: artistWallet,
designer: designerWallet,
marketing: marketingWallet
});Parameters:
wallets(object) - Object mapping names to UmiWallet instances
Returns: Array of registered wallet names
Create basic multisig group with custom rules.
const multisig = await kit.createMultisigGroup({
name: "Development Team",
description: "Core team multisig",
members: [
{ walletName: 'ceo', role: 'ceo', weight: 2 },
{ walletName: 'developer', role: 'developer', weight: 1 },
{ walletName: 'artist', role: 'artist', weight: 1 }
],
threshold: 2,
rules: {
tokenCreation: {
requiredRoles: ['developer', 'ceo'],
threshold: 2
}
}
});Parameters:
name(string) - Multisig group namedescription(string) - Group descriptionmembers(array) - Array of member objects with walletName, role, weightthreshold(number) - Minimum approvals requiredrules(object) - Operation-specific rules
Returns: Promise - Created multisig group
Create gaming studio with predefined roles and rules.
const studio = await kit.createGamingStudioMultisig({
studioName: "Epic Games Studio",
teamWallets: {
ceo: ceoWallet,
lead_developer: devWallet,
art_director: artistWallet,
game_designer: designerWallet,
marketing_lead: marketingWallet
}
});Parameters:
studioName(string) - Gaming studio nameteamWallets(object) - Object mapping roles to UmiWallet instances
Returns: Promise - Created gaming studio multisig
Propose transaction requiring team approval.
const proposal = await kit.proposeTransaction({
multisigId: studio.id,
proposerWalletName: 'lead_developer',
operation: 'createERC20Token',
params: {
name: 'GameCoin',
symbol: 'GAME',
initialSupply: 1000000
},
description: "Main game currency for player transactions",
urgency: 'normal'
});Parameters:
multisigId(string) - Multisig group IDproposerWalletName(string) - Name of proposing walletoperation(string) - Operation to performparams(object) - Operation parametersdescription(string) - Proposal descriptionurgency(string) - Urgency level: 'low', 'normal', 'high', 'emergency'
Returns: Promise - Created proposal
Approve or reject proposals with comments.
await kit.approveProposal({
proposalId: proposal.id,
approverWalletName: 'ceo',
decision: 'approve',
comment: "Looks good, approved! Great tokenomics."
});Parameters:
proposalId(string) - Proposal ID to approve/rejectapproverWalletName(string) - Name of approving walletdecision(string) - Decision: 'approve', 'reject', 'abstain'comment(string) - Optional comment
Returns: Promise - Approval result
Deploy multiple Move contracts without constructor values.
const contracts = await kit.deployContracts('./contracts/', wallet);Parameters:
contractsPath(string) - Path to contracts folderdeployerWallet(UmiWallet) - Wallet to deploy from
Returns: Promise - Object with deployed contract details
Initialize contracts after deployment with constructor values.
await kit.setConstructorValues(contracts.GameToken.address, {
name: 'GameCoin',
symbol: 'GAME',
decimals: 8,
initial_supply: 1000000
}, wallet);Parameters:
contractAddress(string) - Deployed contract addressconstructorArgs(object) - Constructor argumentscallerWallet(UmiWallet) - Wallet to call from
Returns: Promise - Initialization result
Deploy contracts using JSON configuration file.
const ecosystem = await kit.deployWithJson('./contracts/', wallet, './deployment.json');Parameters:
contractsPath(string) - Path to contracts folderdeployerWallet(UmiWallet) - Wallet to deploy fromconfigFile(string) - Optional path to config file
Returns: Promise - Deployed ecosystem
Deploy contracts using JavaScript configuration object.
const ecosystem = await kit.deployWithConfig('./contracts/', wallet, {
GameToken: { name: 'GameCoin', symbol: 'GAME' },
HeroNFT: { name: 'Epic Heroes', gameToken: '@GameToken' }
});Parameters:
contractsPath(string) - Path to contracts folderdeployerWallet(UmiWallet) - Wallet to deploy fromconfigObject(object) - Configuration object
Returns: Promise - Deployed ecosystem
Call any function on a deployed Move contract.
const result = await kit.callContractFunction(
'0x123::gametoken',
'mint',
{ to: wallet.getAddress(), amount: 1000 },
wallet
);Parameters:
contractAddress(string) - Contract module addressfunctionName(string) - Function name to callargs(object) - Function argumentscallerWallet(UmiWallet) - Wallet to call from
Returns: Promise - Function call result
Get current network information.
const info = kit.getNetworkInfo();
console.log(info.network); // 'devnet'
console.log(info.chainId); // 42069
console.log(info.rpcUrl); // RPC endpointReturns: Object with network details
Get latest block number.
const blockNumber = await kit.getBlockNumber();Returns: Promise - Latest block number
Get comprehensive toolkit summary.
const summary = await kit.getSummary();
console.log(summary.walletCount);
console.log(summary.features);
console.log(summary.ai.enabled);
console.log(summary.multisig.groupCount);Returns: Promise - Toolkit summary with all features and status
Validate Move contracts before deployment.
try {
await kit.validateContracts('./contracts/');
console.log('✅ All contracts are valid!');
} catch (error) {
console.error('❌ Validation failed:', error.message);
}Parameters:
contractsPath(string) - Path to contracts folder
Returns: Promise - Resolves if valid, rejects if invalid
Export deployment results to JSON file.
await kit.exportDeploymentResults(
deployedContracts,
'./deployment-results.json'
);Parameters:
deployedContracts(object) - Deployed contracts objectoutputPath(string) - File path to save results
Returns: Promise - Resolves when file is written
Get summary statistics of deployment results.
const summary = kit.getDeploymentSummary(deployedContracts);Parameters:
deployedContracts(object) - Deployed contracts object
Returns: Object with deployment statistics
Create guild treasury for gaming communities.
const guild = await kit.createGuildMultisig({
guildName: "DragonSlayers Guild",
officers: {
guild_leader: leaderWallet,
officer1: officer1Wallet
},
members: {
member1: member1Wallet,
member2: member2Wallet
}
});Parameters:
guildName(string) - Guild nameofficers(object) - Guild officers mappingmembers(object) - Guild members mapping
Returns: Promise - Created guild multisig
Create tournament contract with prize distribution.
const tournament = await kit.createTournament({
deployerWallet: wallet,
name: "Epic Battle Tournament",
entryFee: "10",
maxParticipants: 64,
prizePool: "1000",
gameToken: gameTokenAddress
});Parameters:
deployerWallet(UmiWallet) - Wallet to deploy fromname(string) - Tournament nameentryFee(string) - Entry fee in game tokensmaxParticipants(number) - Maximum participantsprizePool(string) - Total prize poolgameToken(string) - Game token contract address
Returns: Promise - Deployed tournament contract
- Cross-Chain Functions - Multi-blockchain operations
- DeFi Functions - Liquidity pools, staking, yield farming
- Advanced Gaming - Player progression, achievements
- Analytics Functions - Portfolio tracking, performance metrics
- Governance Functions - DAO voting, proposals
enableAI()- Enable AI functionalitychat()- Natural language interfaceconfigureAI()- AI behavior configurationsetAIContext()- Context management
createWallet()- Create new walletimportWallet()- Import existing walletgetBalance()- Check ETH balancetransfer()- Send ETH
createERC20Token()- Deploy ERC-20 tokenscreateMoveToken()- Deploy Move tokenstransferTokens()- Transfer tokens
createNFTCollection()- Deploy ERC-721 collectionsmintNFT()- Mint individual NFTscreateMoveNFTCollection()- Deploy Move NFT collectionsmintMoveNFT()- Mint Move NFTs
createERC1155Collection()- Deploy multi-token collectionscreateERC1155Token()- Create token typesmintERC1155Token()- Mint tokensbatchMintERC1155()- Batch mint multiple typestransferERC1155()- Transfer tokensgetERC1155Balance()- Check balances
registerMultisigWallets()- Register team walletscreateMultisigGroup()- Create basic multisigcreateGamingStudioMultisig()- Create gaming studioproposeTransaction()- Propose team transactionsapproveProposal()- Approve/reject proposals
deployContracts()- Deploy multiple contractssetConstructorValues()- Initialize contractsdeployWithJson()- Deploy with JSON configdeployWithConfig()- Deploy with JS configcallContractFunction()- Call contract functionsvalidateContracts()- Validate before deployment
getNetworkInfo()- Network informationgetBlockNumber()- Latest block numbergetSummary()- Toolkit summary
Total: 35+ Functions across all categories with more coming soon! 🚀
*Need help with any function? Return to Main Documentation*miWallet) - Wallet to deploy from
name(string) - Token namesymbol(string) - Token symboldecimals(number) - Decimal places (default: 18)initialSupply(number) - Initial token supply
Returns: Promise - Deployed token details
Create Move-based tokens.
const moveToken = await kit.createMoveToken({
deployerWallet: wallet,
name: 'MoveCoin',
symbol: 'MOVE',
decimals: 8
});Parameters:
deployerWallet(UmiWallet) - Wallet to deploy fromname(string) - Token namesymbol(string) - Token symboldecimals(number) - Decimal places (default: 8)
Returns: Promise - Deployed Move token details
Transfer tokens between wallets.
await kit.transferTokens({
fromWallet: wallet,
to: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
contractAddress: token.contractAddress,
amount: '1000'
});Parameters:
fromWallet(UmiWallet) - Sender walletto(string) - Recipient addresscontractAddress(string) - Token contract addressamount(string) - Amount to transfer
Returns: Promise - Transaction result
Create ERC-721 NFT collections.
const collection = await kit.createNFTCollection({
deployerWallet: wallet,
name: 'Epic Heroes',
symbol: 'HERO',
maxSupply: 10000,
mintPrice: '0.01',
baseURI: 'https://api.epicgame.com/heroes/'
});Parameters:
deployerWallet(U