Maiar
A MaiarAI plugin that provides secure blockchain transaction processing through a multi-signature escrow system with independent arbiter verification.
Installation
npm install @navalabs/execution-escrow-maiarai
# or
pnpm add @navalabs/execution-escrow-maiarai
Configuration
The plugin requires several environment variables to be set:
Create a .env file with required configuration. See env.example in the project root for all variables:
# Core configuration - see env.example for complete list
PRIVATE_KEY=your_ethereum_private_key
PINATA_JWT=your_pinata_jwt_token
PGP_EXECUTOR_PRIVATE_KEY=-----BEGIN PGP PRIVATE KEY BLOCK-----...
PGP_EXECUTOR_PASSPHRASE=your_pgp_passphrase
Example
import { MaiarAIAdapter } from '@navalabs/execution-escrow-maiarai';
import { ConfigurationService } from '@navalabs/execution-escrow-core';
class ExecutionEscrowPlugin extends MaiarAIAdapter {
constructor() {
const config = ConfigurationService.createExecutionEscrowConfig();
const configService = new ConfigurationService(config);
configService.validate();
super(config);
}
}
// Register with MaiarAI runtime
const plugin = new ExecutionEscrowPlugin(config);
plugin.setRuntime(runtime);
await plugin.init();
Plugin Executors
The plugin provides the following executors that can be called by MaiarAI:
proposeTransaction
Processes user transaction requests through the Execution Escrow system.
Parameters:
userAddress: The user's Nava addressethereumAddress: The user's Ethereum addressrequest: Natural language description of the transaction request- Additional task metadata
Returns:
{
success: boolean,
data: {
transactionRequest: TransactionRequest,
transaction: NavaTransaction,
user: NavaUser
} | { error: string }
}