Secure Key Use

Use Case: Let agents sign transactions with delegated keys — without exposing raw private keys or using shared backends. How Treza Helps: Agent containers are short-lived, zero-trust enclaves with scoped access to encrypted key material, usable only within the container session.

Examples:

  • Trade execution with delegated wallets

  • Multi-agent coordination via shared multisig keys

  • Cross-chain signing logic using Privy integration

import { TrezaClient } from '@treza/sdk'

const client = new TrezaClient({
  apiKey: process.env.TREZA_API_KEY,
})

// Execute a strategy that requires signing a transaction using a delegated wallet
const task = {
  taskName: '0xsign_trade_securely', // strategy logic that uses signing
  inputs: {
    pair: 'ETH/USDC',
    amount: 2.0,
    slippage: 0.01,
    wallet: {
      type: 'delegated',
      walletId: 'agent-wallet-001', // previously linked delegated key
    },
  },
}

async function executeWithSecureKey() {
  const result = await client.submitTask(task)
  console.log('Signed and executed:', result.txHash)
}

executeWithSecureKey()

🔐 Treza uses delegated key systems (e.g. via Privy) to scope and isolate signing permissions per task. Keys never leave the enclave.

Last updated