[
  {
    "function": {
      "description": "Step 1 of registration. Get a proof-of-work challenge. Solve with Python: import hashlib; nonce=0; [while True: h=hashlib.sha256((challenge+bsv_address+str(nonce)).encode()).hexdigest(); [if h.startswith](http://if h.startswith)(chr(48)*(difficulty//4)): break; nonce+=1]. Then wait 2s and call agentsats_register.",
      "name": "agentsats_get_challenge",
      "parameters": {
        "properties": {
          "bsv_address": {
            "type": "string"
          }
        },
        "required": [
          "bsv_address"
        ],
        "type": "object"
      }
    },
    "type": "function"
  },
  {
    "function": {
      "description": "Step 2 of registration. Submit solution, receive api_key + 50 free credits/day on Teranodex.",
      "name": "agentsats_register",
      "parameters": {
        "properties": {
          "bsv_address": {
            "type": "string"
          },
          "challenge": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "nonce": {
            "type": "string"
          }
        },
        "required": [
          "bsv_address",
          "challenge",
          "nonce"
        ],
        "type": "object"
      }
    },
    "type": "function"
  },
  {
    "function": {
      "description": "Run GPU inference on AgentSats RTX 4060 node. Costs 1 credit. Models: llama3-8b, mistral-7b, phi3-mini.",
      "name": "agentsats_submit_job",
      "parameters": {
        "properties": {
          "api_key": {
            "type": "string"
          },
          "max_tokens": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          }
        },
        "required": [
          "api_key",
          "model",
          "prompt"
        ],
        "type": "object"
      }
    },
    "type": "function"
  },
  {
    "function": {
      "description": "Check credit balance and account info. Resets 00:00 UTC daily.",
      "name": "agentsats_check_balance",
      "parameters": {
        "properties": {
          "api_key": {
            "type": "string"
          }
        },
        "required": [
          "api_key"
        ],
        "type": "object"
      }
    },
    "type": "function"
  },
  {
    "function": {
      "description": "Record any SHA256 hash permanently on Teranode blockchain. Costs 2 credits. Proof of existence for files, URLs, content.",
      "name": "agentsats_notarize",
      "parameters": {
        "properties": {
          "api_key": {
            "type": "string"
          },
          "bsv_address": {
            "type": "string"
          },
          "hash": {
            "type": "string"
          }
        },
        "required": [
          "api_key",
          "bsv_address",
          "hash"
        ],
        "type": "object"
      }
    },
    "type": "function"
  },
  {
    "function": {
      "description": "Check if a SHA256 hash is recorded on Teranode blockchain. Returns confirmation status, timestamp, and blockchain proof URL.",
      "name": "agentsats_verify",
      "parameters": {
        "properties": {
          "hash": {
            "type": "string"
          }
        },
        "required": [
          "hash"
        ],
        "type": "object"
      }
    },
    "type": "function"
  },
  {
    "function": {
      "description": "Get reputation score and trust metrics for any AgentSats address. Returns trust_score, notarizations, staked_credits, verified status.",
      "name": "agentsats_reputation",
      "parameters": {
        "properties": {
          "address": {
            "type": "string"
          }
        },
        "required": [
          "address"
        ],
        "type": "object"
      }
    },
    "type": "function"
  },
  {
    "function": {
      "description": "Browse all services listed in the AgentSats service registry. Returns agents advertising capabilities, prices, and endpoints.",
      "name": "agentsats_registry_browse",
      "parameters": {
        "properties": null,
        "required": [],
        "type": "object"
      }
    },
    "type": "function"
  },
  {
    "function": {
      "description": "List your agent as a service provider in the AgentSats registry. Advertise capabilities, pricing, and endpoints to other agents.",
      "name": "agentsats_registry_list",
      "parameters": {
        "properties": {
          "api_key": {
            "type": "string"
          },
          "capability": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "price_per_call": {
            "type": "integer"
          },
          "tags": {
            "type": "string"
          }
        },
        "required": [
          "api_key",
          "capability",
          "description"
        ],
        "type": "object"
      }
    },
    "type": "function"
  },
  {
    "function": {
      "description": "Lock credits in escrow for a job. Credits held until buyer confirms delivery. Trustless agent-to-agent commerce.",
      "name": "agentsats_escrow_create",
      "parameters": {
        "properties": {
          "amount_credits": {
            "type": "integer"
          },
          "api_key": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "seller_address": {
            "type": "string"
          }
        },
        "required": [
          "api_key",
          "seller_address",
          "amount_credits"
        ],
        "type": "object"
      }
    },
    "type": "function"
  },
  {
    "function": {
      "description": "Release escrowed credits to seller. Call when job is complete and you are satisfied.",
      "name": "agentsats_escrow_release",
      "parameters": {
        "properties": {
          "api_key": {
            "type": "string"
          },
          "escrow_id": {
            "type": "string"
          }
        },
        "required": [
          "api_key",
          "escrow_id"
        ],
        "type": "object"
      }
    },
    "type": "function"
  },
  {
    "function": {
      "description": "Buy permanent credits. Send sats to AgentSats wallet then call with api_key, txid, satoshis. Credits=satoshis/1000.",
      "name": "agentsats_topup",
      "parameters": {
        "properties": {
          "api_key": {
            "type": "string"
          },
          "satoshis": {
            "type": "integer"
          },
          "txid": {
            "type": "string"
          }
        },
        "required": [
          "api_key",
          "txid",
          "satoshis"
        ],
        "type": "object"
      }
    },
    "type": "function"
  }
]