{
  "x402Version": 2,
  "id": 3457,
  "slug": "3457",
  "resource": "https://chain-tools.use.x402atlas.com/merkle/build",
  "description": "Keccak Merkle tree and proof builder — generate indexed sorted-pair inclusion proofs with domain separation and explicit odd-node promotion.",
  "type": "http",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "10000",
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "eip155:137",
      "payTo": "0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2",
      "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
      "amount": "10000",
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "eip155:42161",
      "payTo": "0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2",
      "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
      "amount": "10000",
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "bazaar": {
      "category": "utilities",
      "info": {
        "input": {
          "body": {
            "leaves": [
              "0x616c706861",
              "0x62657461",
              "0x67616d6d61"
            ]
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "algorithm_version": "keccak256-sorted-pairs-v1",
            "leaf_count": 3,
            "leaf_hashes": [
              "0x180a512e153366b1510bf090b11069c19394ab868093ef5290ead07f1fbb3386",
              "0x5b3931176fc5f22736bfc5393315c63244f57e672b5017c675220ec7de504ae6",
              "0xe51a809d0bd7c39f11aa7f9ff0ba85099028c7d56f42313f3bb5495a7b967146"
            ],
            "operation": "merkle-build",
            "proofs": [
              {
                "index": 0,
                "steps": [
                  {
                    "hash": "0x5b3931176fc5f22736bfc5393315c63244f57e672b5017c675220ec7de504ae6"
                  },
                  {
                    "hash": "0xe51a809d0bd7c39f11aa7f9ff0ba85099028c7d56f42313f3bb5495a7b967146"
                  }
                ]
              },
              {
                "index": 1,
                "steps": [
                  {
                    "hash": "0x180a512e153366b1510bf090b11069c19394ab868093ef5290ead07f1fbb3386"
                  },
                  {
                    "hash": "0xe51a809d0bd7c39f11aa7f9ff0ba85099028c7d56f42313f3bb5495a7b967146"
                  }
                ]
              },
              {
                "index": 2,
                "steps": [
                  {
                    "hash": "0xbfa0350c48ccd55fb3a8315a6d6bfc41877772eaebfcba73cb195984df5b3d32"
                  }
                ]
              }
            ],
            "root": "0x40a0fa2d0ce898ef138c3403645be77705df9d485ecc137b02b35eb9fdeaaf94",
            "warnings": []
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "leaves": {
                    "description": "Raw leaves in stable caller order; duplicate values remain distinct by zero-based index",
                    "items": {
                      "description": "Zero to 4096 raw bytes as even-length 0x hexadecimal",
                      "maxLength": 8194,
                      "pattern": "^0x(?:[0-9a-fA-F]{2})*$",
                      "type": "string"
                    },
                    "maxItems": 1024,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "leaves"
                ],
                "type": "object"
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "additionalProperties": false,
                "properties": {
                  "_atlas": {
                    "additionalProperties": false,
                    "description": "Atlas documentation and related-route metadata added after deployment",
                    "properties": {
                      "docs": {
                        "description": "Documentation URL for this bridge",
                        "format": "uri",
                        "maxLength": 512,
                        "type": "string"
                      },
                      "related": {
                        "description": "Bounded related Atlas routes",
                        "items": {
                          "additionalProperties": false,
                          "description": "One related Atlas route",
                          "properties": {
                            "bridge": {
                              "description": "Related bridge name",
                              "maxLength": 64,
                              "type": "string"
                            },
                            "docs": {
                              "description": "Related bridge documentation URL",
                              "format": "uri",
                              "maxLength": 512,
                              "type": "string"
                            },
                            "summary": {
                              "description": "Short capability summary",
                              "maxLength": 256,
                              "type": "string"
                            },
                            "url": {
                              "description": "Related route URL",
                              "format": "uri",
                              "maxLength": 512,
                              "type": "string"
                            }
                          },
                          "required": [
                            "bridge",
                            "url",
                            "docs",
                            "summary"
                          ],
                          "type": "object"
                        },
                        "maxItems": 3,
                        "type": "array"
                      }
                    },
                    "required": [
                      "docs"
                    ],
                    "type": "object"
                  },
                  "algorithm_version": {
                    "const": "keccak256-sorted-pairs-v1",
                    "description": "Atlas domain-separated sorted-pair profile",
                    "type": "string"
                  },
                  "leaf_count": {
                    "description": "Number of original leaves",
                    "maximum": 1024,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "leaf_hashes": {
                    "description": "Domain-separated leaf hashes in original order",
                    "items": {
                      "description": "Leaf hash",
                      "pattern": "^0x[0-9a-f]{64}$",
                      "type": "string"
                    },
                    "maxItems": 1024,
                    "minItems": 1,
                    "type": "array"
                  },
                  "operation": {
                    "const": "merkle-build",
                    "description": "Stable route operation",
                    "type": "string"
                  },
                  "proofs": {
                    "description": "Exactly one proof for every original index",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "index": {
                          "description": "Zero-based original leaf index",
                          "maximum": 1023,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "steps": {
                          "description": "Sibling hashes in leaf-to-root order; odd promotions add no step",
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "hash": {
                                "description": "Sibling node hash; direction is unnecessary because pairs sort by hash",
                                "pattern": "^0x[0-9a-f]{64}$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "hash"
                            ],
                            "type": "object"
                          },
                          "maxItems": 10,
                          "type": "array"
                        }
                      },
                      "required": [
                        "index",
                        "steps"
                      ],
                      "type": "object"
                    },
                    "maxItems": 1024,
                    "minItems": 1,
                    "type": "array"
                  },
                  "root": {
                    "description": "Tree root",
                    "pattern": "^0x[0-9a-f]{64}$",
                    "type": "string"
                  },
                  "warnings": {
                    "description": "Always empty",
                    "items": {
                      "description": "Warning",
                      "type": "string"
                    },
                    "maxItems": 0,
                    "type": "array"
                  }
                },
                "required": [
                  "operation",
                  "algorithm_version",
                  "leaf_count",
                  "root",
                  "leaf_hashes",
                  "proofs",
                  "warnings"
                ],
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      },
      "tags": [
        "merkle-proof",
        "merkle-tree",
        "keccak256",
        "proof-generation",
        "blockchain-development"
      ]
    }
  },
  "tags": [
    "bazaar"
  ],
  "sourceHost": "chain-tools.use.x402atlas.com",
  "lastUpdated": "2026-09-15T06:32:31.311Z",
  "quality": {
    "calls30d": 2,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-09-15T06:32:31.181Z"
  },
  "liveness": {},
  "verified": false,
  "featured": false,
  "provider": {
    "host": "chain-tools.use.x402atlas.com",
    "manifest_name": "chain-tools.use.x402atlas.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-09-18T22:00:31.484Z"
  }
}