Create an Agentic Wallet and Identity
In this tutorial, you'll create an MPC wallet, fund it from the testnet faucet, register a human identity via TDIP, create a machine identity with delegation scope, and configure spending limits and allowed operations for autonomous agents.
Prerequisites
You'll need either:
- Tenzro MCP server connected via Claude Desktop or Claude Code (see Connect with Claude tutorial)
- Or
curlfor direct API calls to the MCP server
This tutorial uses curlto demonstrate the raw MCP protocol. If you're using Claude, you can ask it to perform these operations in natural language instead.
What is TDIP?
Tenzro Decentralized Identity Protocol (TDIP) is a unified identity system for humans and machines built on W3C DID standards. Every TDIP identity gets an auto-provisioned 2-of-3 MPC wallet with threshold signing — no seed phrases, no single point of failure.
DID Formats:
did:tenzro:human:{uuid}— Human identitiesdid:tenzro:machine:{controller}:{uuid}— Controlled machine identitiesdid:tenzro:machine:{uuid}— Autonomous machine identities
Step 1: Initialize MCP Session
First, establish a session with the Tenzro MCP server. This uses the Model Context Protocol's initialize handshake:
curl -s -X POST "https://mcp.tenzro.network/mcp" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-03-26",
"capabilities": {},
"clientInfo": {
"name": "tutorial-client",
"version": "1.0"
}
}
}'Save the sessionId from the response — you'll include it in subsequent requests via the Mcp-Session-Id header.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2025-03-26",
"capabilities": {
"tools": {}
},
"serverInfo": {
"name": "tenzro-mcp-server",
"version": "0.1.0"
},
"sessionId": "sess_abc123xyz"
}
}Step 2: Create a Wallet
Call the create_wallet MCP tool to generate a new Ed25519 keypair. Replace YOUR_SESSION_ID with the session ID from step 1:
curl -s -X POST "https://mcp.tenzro.network/mcp" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Mcp-Session-Id: YOUR_SESSION_ID" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "create_wallet",
"arguments": {
"key_type": "ed25519"
}
}
}'Example response:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": "Wallet created successfully!\n\nAddress: 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\nPublic Key: 0x04a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1\nPrivate Key: 0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2\n\nIMPORTANT: Save your private key securely. This is the only time it will be displayed."
}
],
"isError": false
}
}Security Warning
Copy your private key immediately and store it in a secure password manager or hardware wallet. Never share it with anyone. If you lose it, you lose access to your wallet permanently. For production use, consider using a hardware wallet or the auto-provisioned MPC wallet that comes with TDIP identities.
Step 3: Fund from Faucet
Request 100 testnet TNZO tokens using the request_faucet tool. Replace 0xYOUR_ADDRESS with your wallet address from step 2:
curl -s -X POST "https://mcp.tenzro.network/mcp" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Mcp-Session-Id: YOUR_SESSION_ID" \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "request_faucet",
"arguments": {
"address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
}
}
}'The faucet dispenses 100 TNZO per request with a 24-hour cooldown per address:
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [
{
"type": "text",
"text": "Faucet request successful!\n\nAmount: 100 TNZO\nTransaction Hash: 0x7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b\n\nTokens have been sent to: 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
}
],
"isError": false
}
}Step 4: Register a Human Identity
Create a TDIP identity using the register_identity tool. Human identities use the format did:tenzro:human:{uuid}:
curl -s -X POST "https://mcp.tenzro.network/mcp" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Mcp-Session-Id: YOUR_SESSION_ID" \
-d '{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "register_identity",
"arguments": {
"identity_type": "human",
"display_name": "Alice"
}
}
}'Response with your new DID:
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"content": [
{
"type": "text",
"text": "Identity registered successfully!\n\nDID: did:tenzro:human:550e8400-e29b-41d4-a716-446655440000\nType: Human\nDisplay Name: Alice\nStatus: Active\nKYC Tier: Unverified (0)\n\nAn MPC wallet has been auto-provisioned for this identity with 2-of-3 threshold security."
}
],
"isError": false
}
}Step 5: Register a Machine Identity
Machine identities require a controller_did — the human DID from step 4. This establishes the delegation relationship on-chain:
curl -s -X POST "https://mcp.tenzro.network/mcp" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Mcp-Session-Id: YOUR_SESSION_ID" \
-d '{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "register_identity",
"arguments": {
"identity_type": "machine",
"display_name": "Alice Trading Bot",
"controller_did": "did:tenzro:human:550e8400-e29b-41d4-a716-446655440000"
}
}
}'Response with the machine DID (notice the controller UUID prefix):
{
"jsonrpc": "2.0",
"id": 5,
"result": {
"content": [
{
"type": "text",
"text": "Machine identity registered successfully!\n\nDID: did:tenzro:machine:550e8400-e29b-41d4-a716-446655440000:a1b2c3d4-e5f6-7890-abcd-ef1234567890\nType: Machine\nDisplay Name: Alice Trading Bot\nController: did:tenzro:human:550e8400-e29b-41d4-a716-446655440000\nStatus: Active\n\nAn MPC wallet has been auto-provisioned for this identity."
}
],
"isError": false
}
}Step 6: Set Delegation Scope
Configure spending limits, allowed operations, payment protocols, and chains for the machine identity using set_delegation_scope:
curl -s -X POST "https://mcp.tenzro.network/mcp" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Mcp-Session-Id: YOUR_SESSION_ID" \
-d '{
"jsonrpc": "2.0",
"id": 6,
"method": "tools/call",
"params": {
"name": "set_delegation_scope",
"arguments": {
"machine_did": "did:tenzro:machine:550e8400-e29b-41d4-a716-446655440000:a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"max_transaction_value": "1000000000000000000",
"max_daily_spend": "5000000000000000000",
"allowed_operations": ["InferenceRequest", "Transfer"],
"allowed_payment_protocols": ["mpp", "x402"],
"allowed_chains": ["tenzro", "base"]
}
}
}'Confirmation response:
{
"jsonrpc": "2.0",
"id": 6,
"result": {
"content": [
{
"type": "text",
"text": "Delegation scope updated successfully!\n\nMachine DID: did:tenzro:machine:550e8400-e29b-41d4-a716-446655440000:a1b2c3d4-e5f6-7890-abcd-ef1234567890\n\nPermissions:\n- Max Transaction: 1.0 TNZO\n- Max Daily Spend: 5.0 TNZO\n- Allowed Operations: InferenceRequest, Transfer\n- Payment Protocols: mpp, x402\n- Allowed Chains: tenzro, base"
}
],
"isError": false
}
}Step 7: Verify the Identity
Resolve the machine identity to view the complete delegation scope and control relationship:
curl -s -X POST "https://mcp.tenzro.network/mcp" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Mcp-Session-Id: YOUR_SESSION_ID" \
-d '{
"jsonrpc": "2.0",
"id": 7,
"method": "tools/call",
"params": {
"name": "resolve_did",
"arguments": {
"did": "did:tenzro:machine:550e8400-e29b-41d4-a716-446655440000:a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
}'Full identity resolution including delegation scope:
{
"jsonrpc": "2.0",
"id": 7,
"result": {
"content": [
{
"type": "text",
"text": "Identity Resolution\n\nDID: did:tenzro:machine:550e8400-e29b-41d4-a716-446655440000:a1b2c3d4-e5f6-7890-abcd-ef1234567890\nType: Machine\nDisplay Name: Alice Trading Bot\nController: did:tenzro:human:550e8400-e29b-41d4-a716-446655440000\nStatus: Active\n\nDelegation Scope:\n- Max Transaction Value: 1000000000000000000 wei (1.0 TNZO)\n- Max Daily Spend: 5000000000000000000 wei (5.0 TNZO)\n- Allowed Operations: InferenceRequest, Transfer\n- Allowed Payment Protocols: mpp, x402\n- Allowed Chains: tenzro, base\n- Time Bound: None (permanent)\n- Allowed Contracts: [] (any contract)"
}
],
"isError": false
}
}Understanding Delegation Scopes
A DelegationScope defines precisely what a machine identity can do. Each field provides a different layer of control:
| Field | Description |
|---|---|
max_transaction_value | Maximum amount per transaction (in wei). Transactions exceeding this limit will be rejected. |
max_daily_spend | Maximum cumulative spend per 24-hour period (in wei). Resets at midnight UTC. |
allowed_operations | List of permitted operation types: InferenceRequest, Transfer, ContractCall, BridgeTransfer, etc. |
allowed_contracts | Whitelist of smart contract addresses the agent can interact with. Empty array means any contract. |
time_bound | Expiration timestamp (Unix epoch). After this time, the identity is automatically revoked. Null means permanent. |
allowed_payment_protocols | Permitted payment methods: mpp, x402, native, channel |
allowed_chains | List of chain IDs where the agent can operate: tenzro, ethereum, solana, base, polygon |
What's Next?
You've successfully created:
- A wallet with Ed25519 keypair
- A human TDIP identity with auto-provisioned MPC wallet
- A machine identity controlled by the human identity
- Delegation scope with spending limits, operation restrictions, and protocol allowlists
Next, learn how to use these identities to enable machine-to-machine payments with MPP and x402:
Continue Learning
Ready to enable autonomous payments for your AI agent?