{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/theblueprint-xyz/json-schema/theblueprint-xyz-wallet-generate-response-schema.json",
  "title": "WalletGenerateResponse",
  "description": "Local wallet generation code and instructions. Blueprint never generates or handles private keys.",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/theblueprint-xyz-openapi.json#/components/schemas/WalletGenerateResponse",
  "type": "object",
  "properties": {
    "method": {
      "type": "string",
      "enum": [
        "LOCAL_GENERATION"
      ],
      "description": "Always LOCAL_GENERATION — wallet is generated in the agent's environment"
    },
    "why": {
      "type": "string",
      "description": "Explanation of why local generation is used"
    },
    "code": {
      "type": "object",
      "description": "Code snippets to generate a wallet locally",
      "properties": {
        "javascript": {
          "type": "string",
          "description": "Node.js code using @solana/web3.js"
        },
        "python": {
          "type": "string",
          "description": "Python code using solders"
        },
        "cli": {
          "type": "string",
          "description": "Solana CLI command"
        }
      }
    },
    "nextSteps": {
      "type": "object",
      "description": "Step-by-step instructions after generating a wallet",
      "properties": {
        "1_generate": {
          "type": "string",
          "description": "Run the code above in your environment to create a keypair"
        },
        "2_fund": {
          "type": "string",
          "description": "Send SOL to your public key from an exchange or wallet"
        },
        "3_checkBalance": {
          "type": "string",
          "description": "API call to verify your wallet balance"
        },
        "4_stake": {
          "type": "string",
          "description": "API call to build an unsigned stake transaction"
        },
        "5_sign": {
          "type": "string",
          "description": "Sign the returned base64 transaction locally with your keypair"
        },
        "6_submit": {
          "type": "string",
          "description": "API call to submit the signed transaction to Solana"
        }
      }
    },
    "securityModel": {
      "type": "object",
      "description": "Explanation of the zero-custody security model",
      "properties": {
        "privateKey": {
          "type": "string",
          "description": "How private keys are handled (never leaves your environment)"
        },
        "publicKey": {
          "type": "string",
          "description": "How public keys are used (only identifier sent to Blueprint)"
        },
        "transactions": {
          "type": "string",
          "description": "How transactions work (returned unsigned, signed client-side)"
        },
        "custody": {
          "type": "string",
          "description": "Custody model (your wallet retains full authority)"
        }
      }
    },
    "_meta": {
      "$ref": "#/$defs/ResponseMeta"
    }
  },
  "$defs": {
    "ResponseMeta": {
      "type": "object",
      "description": "Navigation metadata included in most responses",
      "properties": {
        "endpoint": {
          "type": "string",
          "description": "The endpoint that generated this response"
        },
        "description": {
          "type": "string",
          "description": "Brief description of the response"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp when this response was generated"
        },
        "relatedEndpoints": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Related REST endpoints for next actions"
        },
        "relatedTools": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Related MCP tool names (MCP responses only)"
        },
        "nextSteps": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Contextual next steps based on response data"
        },
        "verifyThisCode": {
          "type": "string",
          "description": "Endpoint to verify code integrity"
        },
        "cacheTtlSeconds": {
          "type": "integer",
          "description": "Cache TTL for this response"
        },
        "documentation": {
          "type": "string",
          "description": "Link to documentation"
        },
        "support": {
          "type": "object",
          "description": "Optional donation info — Blueprint is free, donation-supported infrastructure",
          "properties": {
            "address": {
              "type": "string",
              "description": "Solana address for donations"
            },
            "message": {
              "type": "string",
              "description": "Context about why donations help"
            },
            "donate": {
              "type": "string",
              "description": "How to build a donation transaction via API/MCP"
            }
          }
        }
      }
    }
  }
}